Skip to content

Commit 6f8525e

Browse files
committed
xdp-dump/tests: Fixup test definitions
Some of the xdpdump test definitions were making particular assumptions about the interface names and IP addresses used for the test setup, which broke during the test harness refactor. Fixup the test definitions to remove those assumptions. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
1 parent e676b0a commit 6f8525e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

xdp-dump/tests/test-xdpdump.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ test_capt_pcapng()
149149
INFOS_REGEX+="Capture hardware: $HW.*"
150150
INFOS_REGEX+="Capture oper-sys: $OS.*"
151151
INFOS_REGEX+="Capture application: xdpdump v[0-9]+\.[0-9]+\.[0-9]+.*"
152-
INFOS_REGEX+="Capture comment: Capture was taken on interface xdptest, with the following XDP programs loaded: xdp_dispatcher\(\) xdp_test_prog_w.*"
152+
INFOS_REGEX+="Capture comment: Capture was taken on interface $NS, with the following XDP programs loaded: xdp_dispatcher\(\) xdp_test_prog_w.*"
153153
INFOS_REGEX+="Interface #0 info:.*"
154154
INFOS_REGEX+="Name = ${NS}:xdp_test_prog_with_a_long_name\(\)@fentry.*"
155155
if [ $OLD_CAPINFOS -eq 0 ]; then
@@ -188,7 +188,7 @@ test_capt_pcapng()
188188
fi
189189

190190
if version_greater_or_equal "$TSHARK_VERSION" 3.6.7; then
191-
local ATTRIB_REGEX="^xdptest:xdp_test_prog_with_a_long_name\(\)@fentry 0 1 $.*^xdptest:xdp_test_prog_with_a_long_name\(\)@fexit 0 1 2$.*"
191+
local ATTRIB_REGEX="^$NS:xdp_test_prog_with_a_long_name\(\)@fentry 0 1 $.*^$NS:xdp_test_prog_with_a_long_name\(\)@fexit 0 1 2$.*"
192192
RESULT=$(tshark -r "$PCAP_FILE" -T fields \
193193
-e frame.interface_name \
194194
-e frame.interface_queue \
@@ -213,7 +213,7 @@ test_capt_term()
213213

214214
local PASS_REGEX="(xdp_test_prog_with_a_long_name\(\)@entry: packet size 118 bytes on if_index [0-9]+, rx queue [0-9]+, id [0-9]+)"
215215
local PASS_X_REGEX="(xdp_test_prog_with_a_long_name\(\)@entry: packet size 118 bytes, captured 118 bytes on if_index [0-9]+, rx queue [0-9]+, id [0-9]+)"
216-
local PASS_X_OPT="0x0020: 00 00 00 00 00 02 fc 42 de ad ca fe 00 01 00 00"
216+
local PASS_X_OPT="0x0020: 00 00 00 00 00 02 fc 42 de ad ca fe"
217217

218218
$PING6 -W 2 -c 1 "$INSIDE_IP6" || return 1
219219

0 commit comments

Comments
 (0)