From: Ethan Jackson Date: Tue, 17 Jul 2012 17:07:36 +0000 (-0700) Subject: tests: Fix unit test failures related to additional logging. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08b9b19009d5fcddc229519010f0c6c317d0b08d;p=openvswitch tests: Fix unit test failures related to additional logging. 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 [blp@nicira.com changed the strategy for fixing ovsdb-server.at] Signed-off-by: Ben Pfaff --- diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index b430b0e5..139acc61 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -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, diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index b0c4fa04..e7d6da4d 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -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']])