From 1a788d9cb44cb32074d21131feed1b6f5fb17391 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 10 Oct 2023 16:33:55 -0400 Subject: [PATCH] tests: Use fmt_pkt in 1 HV, 2 LSs, 1 lport/LS, 1 LR. Execution time: 3.329s Execution time on "main" branch: 2.794s Signed-off-by: Mark Michelson Signed-off-by: 0-day Robot --- tests/ovn.at | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index f0dd12043e..80e6008b0f 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -6145,11 +6145,13 @@ AT_CAPTURE_FILE([sbflows]) # Send ip packets between the two ports. # Packet to send. -src_mac="f00000010203" -dst_mac="000000010203" -src_ip=`ip_to_hex 192 168 1 2` -dst_ip=`ip_to_hex 172 16 1 2` -packet=${dst_mac}${src_mac}08004500001c0000000040110000${src_ip}${dst_ip}0035111100080000 +src_mac="f0:00:00:01:02:03" +dst_mac="00:00:00:01:02:03" +src_ip=192.168.1.2 +dst_ip=172.16.1.2 +packet=$(fmt_pkt "Ether(dst='${dst_mac}', src='${src_mac}')/ \ + IP(src='${src_ip}', dst='${dst_ip}')/ \ + UDP(sport=53, dport=4369)") as hv1 ovs-appctl netdev-dummy/receive vif1 $packet #Disable router R1 @@ -6161,9 +6163,11 @@ AT_CAPTURE_FILE([sbflows2]) as hv1 ovs-appctl netdev-dummy/receive vif1 $packet # Packet to Expect -expect_src_mac="000000010204" -expect_dst_mac="f00000010204" -echo "${expect_dst_mac}${expect_src_mac}08004500001c000000003f110100${src_ip}${dst_ip}0035111100080000" > expected +expect_src_mac="00:00:00:01:02:04" +expect_dst_mac="f0:00:00:01:02:04" +echo $(fmt_pkt "Ether(dst='${expect_dst_mac}', src='${expect_src_mac}')/ \ + IP(src='${src_ip}', dst='${dst_ip}', ttl=0x3f)/ \ + UDP(sport=53, dport=4369)") > expected OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [expected])