[ovs-dev] [test log scan 5/5] ofproto-macros: Fail a test that logs a WARN or higher level message.

Ben Pfaff blp at nicira.com
Fri Aug 17 23:34:59 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 944fbac..b10ff50 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -64,6 +64,11 @@ 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])
    trap '' 0])
-- 
1.7.2.5




More information about the dev mailing list