[ovs-dev] [PATCH] tests: Avoid nonportable "sed -i".

Ben Pfaff blp at nicira.com
Wed Aug 26 21:44:43 UTC 2015

"sed -i" isn't entirely portable, and we can avoid it by using the
argument to check_logs as intended.

CC: Alex Wang <alexw at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
 tests/ovn-controller-vtep.at | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
index 9fc1526..4c32efd 100644
--- a/tests/ovn-controller-vtep.at
+++ b/tests/ovn-controller-vtep.at
@@ -89,8 +89,7 @@ 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 '/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])

More information about the dev mailing list