From: Ben Pfaff Date: Mon, 23 Apr 2012 17:07:29 +0000 (-0700) Subject: tests: Generalize 'sed' calls in MAC learning test to more than one digit. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83664f72d35177a90ab13506a223580816b5ee6b;p=openvswitch tests: Generalize 'sed' calls in MAC learning test to more than one digit. With "check-valgrind" the test can take more than 10 seconds to run, so replacing only a single trailing digit with ? ends up with 1? which causes the test to fail. Signed-off-by: Ben Pfaff --- diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 801025af..2c5df96c 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -851,7 +851,7 @@ OFPROTO_TRACE( [0,1,2]) # Check for the MAC learning entry. -AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl port VLAN MAC Age 3 0 50:54:00:00:00:05 ? ]) @@ -865,7 +865,7 @@ OFPROTO_TRACE( [3]) # Check for both MAC learning entries. -AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl port VLAN MAC Age 3 0 50:54:00:00:00:05 ? 1 0 50:54:00:00:00:06 ? @@ -879,7 +879,7 @@ OFPROTO_TRACE( [0,1,3]) # Check that the MAC learning entry was updated. -AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl port VLAN MAC Age 1 0 50:54:00:00:00:06 ? 2 0 50:54:00:00:00:05 ? @@ -906,7 +906,7 @@ OFPROTO_TRACE( [0,4]) # Check that the MAC learning entries were added. -AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]$/?/'], [0], [dnl +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl port VLAN MAC Age 4 0 50:54:00:00:00:06 ? 5 0 50:54:00:00:00:07 ? @@ -915,11 +915,11 @@ AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]$/?/'], [0], [dnl # Delete port p1 and see that its MAC learning entry disappeared, and # that the MAC learning entry for the same MAC was also deleted from br1. AT_CHECK([ovs-vsctl del-port p1]) -AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl port VLAN MAC Age 2 0 50:54:00:00:00:05 ? ]) -AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]$/?/'], [0], [dnl +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl port VLAN MAC Age 5 0 50:54:00:00:00:07 ? ])