BIND 10 master, updated. 778bd1be6ced7f4a135e2a6bcc7414c4e4bdc27d [master] fix compiler warn error in test

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Aug 26 15:16:51 UTC 2011


The branch, master has been updated
       via  778bd1be6ced7f4a135e2a6bcc7414c4e4bdc27d (commit)
      from  255bf5b18e2b0e28a65062e87dc2d1212376bfc2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 778bd1be6ced7f4a135e2a6bcc7414c4e4bdc27d
Author: Jelte Jansen <jelte at isc.org>
Date:   Fri Aug 26 17:14:57 2011 +0200

    [master] fix compiler warn error in test
    
    result value of system() was unused. And if we're catching it anyway, might as well error on it if the command failed.
    reviewed on jabber

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/tests/sqlite3_accessor_unittest.cc |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
index 427ee71..022f68e 100644
--- a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
+++ b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
@@ -431,9 +431,16 @@ class SQLite3Update : public SQLite3AccessorTest {
 protected:
     SQLite3Update() {
         // Note: if "installing" the test file fails some of the subsequent
-        // tests will fail and we should be able to notice that.
-        system(INSTALL_PROG " " TEST_DATA_DIR
-               "/test.sqlite3 " TEST_DATA_BUILDDIR "/test.sqlite3.copied");
+        // tests would fail.
+        const char *install_cmd = INSTALL_PROG " " TEST_DATA_DIR
+                                  "/test.sqlite3 " TEST_DATA_BUILDDIR
+                                  "/test.sqlite3.copied";
+        if (system(install_cmd) != 0) {
+            // any exception will do, this is failure in test setup, but nice
+            // to show the command that fails, and shouldn't be caught
+            isc_throw(isc::Exception,
+                      "Error setting up; command failed: " << install_cmd);
+        };
         initAccessor(TEST_DATA_BUILDDIR "/test.sqlite3.copied", RRClass::IN());
         zone_id = accessor->getZone("example.com.").second;
         another_accessor.reset(new SQLite3Accessor(




More information about the bind10-changes mailing list