Skip to content

Commit 71067c2

Browse files
kuba-moosmb49
authored andcommitted
selftests: cmsg_ipv6: repeat the exact packet
BugLink: https://bugs.launchpad.net/bugs/2059991 [ Upstream commit 4b00d0c ] cmsg_ipv6 test requests tcpdump to capture 4 packets, and sends until tcpdump quits. Only the first packet is "real", however, and the rest are basic UDP packets. So if tcpdump doesn't start in time it will miss the real packet and only capture the UDP ones. This makes the test fail on slow machine (no KVM or with debug enabled) 100% of the time, while it passes in fast environments. Repeat the "real" / expected packet. Fixes: 9657ad0 ("selftests: net: test IPV6_TCLASS") Fixes: 05ae83d ("selftests: net: test IPV6_HOPLIMIT") Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Portia Stephens <[email protected]> Signed-off-by: Roxana Nicolescu <[email protected]>
1 parent 4fc270a commit 71067c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/net/cmsg_ipv6.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ for ovr in setsock cmsg both diff; do
9191
check_result $? 0 "TCLASS $prot $ovr - pass"
9292

9393
while [ -d /proc/$BG ]; do
94-
$NSEXE ./cmsg_sender -6 -p u $TGT6 1234
94+
$NSEXE ./cmsg_sender -6 -p $p $m $((TOS2)) $TGT6 1234
9595
done
9696

9797
tcpdump -r $TMPF -v 2>&1 | grep "class $TOS2" >> /dev/null
@@ -128,7 +128,7 @@ for ovr in setsock cmsg both diff; do
128128
check_result $? 0 "HOPLIMIT $prot $ovr - pass"
129129

130130
while [ -d /proc/$BG ]; do
131-
$NSEXE ./cmsg_sender -6 -p u $TGT6 1234
131+
$NSEXE ./cmsg_sender -6 -p $p $m $LIM $TGT6 1234
132132
done
133133

134134
tcpdump -r $TMPF -v 2>&1 | grep "hlim $LIM[^0-9]" >> /dev/null

0 commit comments

Comments
 (0)