tests: Fix unit test failures related to additional logging.
authorEthan Jackson <ethan@nicira.com>
Tue, 17 Jul 2012 17:07:36 +0000 (10:07 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 17 Jul 2012 17:07:49 +0000 (10:07 -0700)
Commit a890678229 (userspace: Log version on startup.) added
additional logging to ovsdb-server and ovs-vswitchd, but failed to
make certain the unit tests still passed.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
[blp@nicira.com changed the strategy for fixing ovsdb-server.at]
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovsdb/ovsdb-server.c
tests/ofproto-macros.at

index b430b0e56711b3a8ff1f8e664ec44b93e6bdc00e..139acc61107b4037564977ca97eaafc8d96b9b0d 100644 (file)
@@ -137,7 +137,12 @@ main(int argc, char *argv[])
 
     daemonize_complete();
 
-    VLOG_INFO("%s (Open vSwitch) %s", program_name, VERSION);
+    if (!run_command) {
+        /* ovsdb-server is usually a long-running process, in which case it
+         * makes plenty of sense to log the version, but --run makes
+         * ovsdb-server more like a command-line tool, so skip it.  */
+        VLOG_INFO("%s (Open vSwitch) %s", program_name, VERSION);
+    }
 
     unixctl_command_register("exit", "", 0, 0, ovsdb_server_exit, &exiting);
     unixctl_command_register("ovsdb-server/compact", "", 0, 0,
index b0c4fa048c05caa8c3c8a415d32555f34a201a2b..e7d6da4d89c689f3143aa4106b2e92f7f9caebb4 100644 (file)
@@ -41,7 +41,9 @@ m4_define([OVS_VSWITCHD_START],
 
    dnl Start ovsdb-server.
    AT_CHECK([ovsdb-server --detach --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock], [0], [], [stderr])
-   AT_CHECK([[sed < stderr '/vlog|INFO|opened log file/d']])
+   AT_CHECK([[sed < stderr '
+/vlog|INFO|opened log file/d
+/ovsdb_server|INFO|ovsdb-server (Open vSwitch)/d']])
    AT_CAPTURE_FILE([ovsdb-server.log])
 
    dnl Initialize database.
@@ -52,6 +54,7 @@ m4_define([OVS_VSWITCHD_START],
    AT_CAPTURE_FILE([ovs-vswitchd.log])
    AT_CHECK([[sed < stderr '
 /vlog|INFO|opened log file/d
+/vswitchd|INFO|ovs-vswitchd (Open vSwitch)/d
 /reconnect|INFO|/d
 /ofproto|INFO|using datapath ID/d
 /ofproto|INFO|datapath ID changed to fedcba9876543210/d']])