The `grep` pattern was so broad that it allowed to match any string that
contained `p2`. This is problematic because the path to service log and
sockets is part of log message. It made it so that the test case failed
whenever executed from a directory that has `p2` in any of its absolute
path chain.

Signed-off-by: Ihar Hrachyshka <[email protected]>
---
 tests/tunnel.at | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/tunnel.at b/tests/tunnel.at
index 09e3c94c7..f6be3f345 100644
--- a/tests/tunnel.at
+++ b/tests/tunnel.at
@@ -1066,9 +1066,7 @@ OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 
type=vxlan \
 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=vxlan 
options:dst_port=9000 \
                     options:remote_ip=flow options:exts=gbp ofport_request=2])
 
-AT_CHECK([grep p2 ovs-vswitchd.log | sed "s/^.*\(bridge br0:.*\)$/\1/"], [0],
-  [bridge br0: added interface p2 on port 2
-])
+AT_CHECK([grep -q 'bridge br0: added interface p2 on port 2' 
ovs-vswitchd.log], [0])
 
 OVS_VSWITCHD_STOP
 AT_CLEANUP
-- 
2.50.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to