[ovs-dev] [tests 06/22] ofproto-macros: Fail a test that logs a WARN or higher level message.

Ben Pfaff blp at nicira.com
Fri Oct 26 00:02:02 UTC 2012


Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 tests/ofproto-macros.at |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
index 52f19fc..585bcae 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -64,5 +64,10 @@ m4_define([OVS_VSWITCHD_START],
 ])
 
 m4_define([OVS_VSWITCHD_STOP],
-  [AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
+  [dnl Report a failure if a message at WARN level or higher was logged.
+   AT_CHECK([sed -n '/|WARN|/p
+/|ERR|/p
+/|EMER|/p' ovs-vswitchd.log ovsdb-server.log])
+
+   AT_CHECK([ovs-appctl -t ovs-vswitchd exit])
    AT_CHECK([ovs-appctl -t ovsdb-server exit])])
-- 
1.7.2.5




More information about the dev mailing list