summaryrefslogtreecommitdiff
path: root/tests/tunnel-push-pop.at
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2021-10-12 15:33:07 +0200
committerIlya Maximets <i.maximets@ovn.org>2021-10-12 21:41:27 +0200
commit01bca6dab99c6f266749b701b372214fb9f07712 (patch)
treec620948aefd0e426fecdb6748ab16ccf5a302a3e /tests/tunnel-push-pop.at
parent3486d81d17dadea72f0a580fdf00c92298d0f349 (diff)
downloadopenvswitch-01bca6dab99c6f266749b701b372214fb9f07712.tar.gz
tunnel-push-pop.at: Mask source port in tunnel header.
Source port is based on a packet hash and hash depends on a chosen implementation. Masking it to avoid test failures with '-msse4.2'. Fixes: 7e6b41ac8d9d ("dpif-netdev: Fix crash when PACKET_OUT is metered.") Reported-by: Kumar Amber <kumar.amber@intel.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Acked-by: Alin-Gabriel Serdean <aserdean@ovn.org>
Diffstat (limited to 'tests/tunnel-push-pop.at')
-rw-r--r--tests/tunnel-push-pop.at10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at
index 12fc1ef91..636465397 100644
--- a/tests/tunnel-push-pop.at
+++ b/tests/tunnel-push-pop.at
@@ -628,20 +628,22 @@ AT_CHECK([
AT_CHECK([ovs-vsctl -- set Interface p0 options:tx_pcap=p0.pcap])
packet=50540000000a505400000009123
-encap=f8bc124434b6aa55aa5500000800450000320000400040113406010102580101025c83a917c1001e00000000655800007b00
+dnl Source port is based on a packet hash, so it may differ depending on the
+dnl compiler flags and CPU type. Masked with '....'.
+encap=f8bc124434b6aa55aa5500000800450000320000400040113406010102580101025c....17c1001e00000000655800007b00
dnl Output to tunnel from a int-br internal port.
dnl Checking that the packet arrived and it was correctly encapsulated.
AT_CHECK([ovs-ofctl add-flow int-br "in_port=LOCAL,actions=debug_slow,output:2"])
AT_CHECK([ovs-appctl netdev-dummy/receive int-br "${packet}4"])
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep "${encap}${packet}4" | wc -l` -ge 1])
+OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | egrep "${encap}${packet}4" | wc -l` -ge 1])
dnl Sending again to exercise the non-miss upcall path.
AT_CHECK([ovs-appctl netdev-dummy/receive int-br "${packet}4"])
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep "${encap}${packet}4" | wc -l` -ge 2])
+OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | egrep "${encap}${packet}4" | wc -l` -ge 2])
dnl Output to tunnel from the controller.
AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out int-br CONTROLLER "debug_slow,output:2" "${packet}5"])
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep "${encap}${packet}5" | wc -l` -ge 1])
+OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | egrep "${encap}${packet}5" | wc -l` -ge 1])
dnl Datapath actions should not have tunnel push action.
AT_CHECK([ovs-appctl dpctl/dump-flows | grep -q tnl_push], [1])