diff mbox series

[ovs-dev,01/13] tests: Use fmt_pkt in ovn -- allows ACLs to match ...

Message ID 20231010203400.1045353-2-mmichels@redhat.com
State Changes Requested
Headers show
Series tests: Convert some tests to use fmt_pkt. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Mark Michelson Oct. 10, 2023, 8:33 p.m. UTC
... against vlan-transparent double tagged traffic L3 fields.

Execution time: 2.377s
Execution time on "main" branch: 1.997s

Signed-off-by: Mark Michelson <mmichels@redhat.com>
---
 tests/ovn.at | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 96a77b070..3f00829ff 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -2335,8 +2335,11 @@  done
 
 test_tcp_packet() {
     local inport=$1 eth_dst=$2 eth_src=$3 ip_dst=$4 ip_src=$5 eout=$6 lout=$7 fail=$8
-    tag=810000ff
-    local packet=${eth_dst}${eth_src}${tag}${tag}08004500002800004000ff060000${ip_src}${ip_dst}0001000100000001000000005000ffff00000000
+    local packet=$(fmt_pkt "Ether(dst='${eth_dst}', src='${eth_src}')/ \
+                            Dot1Q()/ \
+                            Dot1Q()/ \
+                            IP(dst='${ip_dst}', src='${ip_src}')/ \
+                            TCP()")
     as hv-$inport ovs-appctl netdev-dummy/receive vif$inport $packet
     if [[ $fail -eq 0 ]]; then
         echo $packet >> ${eout#lp}.expected
@@ -2349,8 +2352,8 @@  for i in 1 2; do
 done
 check ovn-nbctl --wait=hv sync
 
-test_tcp_packet 1 f00000000002 f00000000001 0a000002 0a000001 lp2 lp2 1
-test_tcp_packet 2 f00000000001 f00000000002 0a000001 0a000002 lp1 lp1 1
+test_tcp_packet 1 f0:00:00:00:00:02 f0:00:00:00:00:01 10.0.0.2 10.0.0.1 lp2 lp2 1
+test_tcp_packet 2 f0:00:00:00:00:01 f0:00:00:00:00:02 10.0.0.1 10.0.0.2 lp1 lp1 1
 
 for i in 1 2; do
     OVN_CHECK_PACKETS_REMOVE_BROADCAST([vif$i-tx.pcap], [$i.expected])
@@ -2363,8 +2366,8 @@  for i in 1 2; do
 done
 check ovn-nbctl --wait=hv sync
 
-test_tcp_packet 2 f00000000001 f00000000002 0a000001 0a000002 lp1 lp1 0
-test_tcp_packet 1 f00000000002 f00000000001 0a000002 0a000001 lp2 lp2 0
+test_tcp_packet 2 f0:00:00:00:00:01 f0:00:00:00:00:02 10.0.0.1 10.0.0.2 lp1 lp1 0
+test_tcp_packet 1 f0:00:00:00:00:02 f0:00:00:00:00:01 10.0.0.2 10.0.0.1 lp2 lp2 0
 
 for i in 1 2; do
     OVN_CHECK_PACKETS_REMOVE_BROADCAST([vif$i-tx.pcap], [$i.expected])