ovs-vswitchd.at: Fix "start additional ovs-vswitchd process" test
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Wed, 1 Oct 2014 05:00:36 +0000 (14:00 +0900)
committerAlex Wang <alexw@nicira.com>
Thu, 9 Oct 2014 16:48:23 +0000 (09:48 -0700)
NetBSD implementation of wc command outputs extra whitespaces
like the following.  Tweak the test to success on such environments.

    % echo hoge|wc -l|hexdump -C
    00000000  20 20 20 20 20 20 20 31  0a                       |       1.|
    00000009
    %

The failing test was introduced by
commit 6bef3c7ca859f208239ca61ec3b25c09a3571553
("bridge: Fix high cpu utilization.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Joe Stringer <joestringer@nicira.com>
tests/ovs-vswitchd.at

index 71a2b40..99aafd4 100644 (file)
@@ -84,13 +84,8 @@ kill $pid
 # check the fakelog, should only see one ERR for reporting
 # the existing ovs-vswitchd process and one WARN for killing
 # the process.
-AT_CHECK([grep ERR fakelog | wc -l], [0], [dnl
-1
-])
-
-AT_CHECK([grep WARN fakelog | wc -l], [0], [dnl
-1
-])
+AT_CHECK([test `grep ERR fakelog | wc -l` -eq 1])
+AT_CHECK([test `grep WARN fakelog | wc -l` -eq 1])
 
 AT_CHECK([grep ERR fakelog | sed -e 's/^.*ERR|//; s/pid [[0-9]]*//'], [0], [dnl
 another ovs-vswitchd process is running, disabling this process () until it goes away