aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2015-08-27 11:11:03 -0700
committerBen Pfaff <blp@nicira.com>2015-08-28 11:02:01 -0700
commitd3292ddf5bc30f1c0073d273e1081c519e763c7d (patch)
tree5d6eba0a63f9556112119d3e69f9e8fa3c9aed44
parent32e35d7ddfcc04bef7e69706bf0fec4d304337e3 (diff)
tests: Avoid nonportable "sed -i".
"sed -i" isn't entirely portable, and we can avoid it by using the argument to check_logs as intended. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>
-rw-r--r--tests/ovn-controller-vtep.at14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
index 9fc152645..063feebcf 100644
--- a/tests/ovn-controller-vtep.at
+++ b/tests/ovn-controller-vtep.at
@@ -89,8 +89,8 @@ m4_define([OVN_CONTROLLER_VTEP_STOP],
# sending update back to *ctl command if *ctl has not proceeded to exit yet.
# and if *ctl command exits before database calling send, the send from
# database will fail with 'Broken pipe' error.
- AT_CHECK([sed -i '/Broken pipe/d' ovsdb-server.log])
- AT_CHECK([check_logs $1])
+ AT_CHECK([check_logs "$1
+/Broken pipe/d"])
AT_CHECK([ovs-appctl -t ovs-vtep exit])
AT_CHECK([ovs-appctl -t ovn-northd exit])
AT_CHECK([ovs-appctl -t ovn-controller-vtep exit])
@@ -131,10 +131,6 @@ OVS_WAIT_UNTIL([test -n "`grep WARN ovn-controller-vtep.log`"])
AT_CHECK([sed -n 's/^.*\(|WARN|.*\)$/\1/p' ovn-controller-vtep.log], [0], [dnl
|WARN|Chassis for VTEP physical switch (br-vtep) disappears, maybe deleted by ovn-sbctl, adding it back
])
-# this removal of chassis could cause 'Broken pipe' warning in the ovsdb-server.log,
-# due to the race between 'ovn-sbctl' exiting and 'ovn-controller-vtep' adding
-# the chassis back. so just removes the 'Broken pipe' warning from ovsdb-server.log.
-AT_CHECK([sed -i '/Broken pipe/d' ovsdb-server.log])
# changes the tunnel_ip on physical switch, watches the update of chassis's
# encap.
@@ -179,7 +175,7 @@ AT_CHECK([ovn-sbctl --columns=vtep_logical_switches list Chassis | cut -d ':' -f
[[]]
])
-OVN_CONTROLLER_VTEP_STOP(["/Chassis for VTEP physical switch (br-vtep) disappears/d"])
+OVN_CONTROLLER_VTEP_STOP([/Chassis for VTEP physical switch (br-vtep) disappears/d])
AT_CLEANUP
@@ -242,7 +238,7 @@ AT_CHECK_UNQUOTED([ovn-sbctl --columns=chassis list Port_Binding | cut -d ':' -f
[[]]
])
-OVN_CONTROLLER_VTEP_STOP(["/has already been associated with logical port/d"])
+OVN_CONTROLLER_VTEP_STOP([/has already been associated with logical port/d])
AT_CLEANUP
@@ -282,5 +278,5 @@ AT_CHECK_UNQUOTED([ovn-sbctl --columns=chassis list Port_Binding br-vtep_lswitch
${chassis_uuid}
])
-OVN_CONTROLLER_VTEP_STOP(["/has already been associated with logical datapath/d"])
+OVN_CONTROLLER_VTEP_STOP([/has already been associated with logical datapath/d])
AT_CLEANUP