Skip to content

Commit 317edcf

Browse files
committed
tests/xdp-trafficgen: Skip tests if probe fails for any reason
The xdp-trafficgen tests were looking at particular return codes from xdp-trafficgen; since the return code is not binary 1/0 depending on probe results, just skip the tests if the probe fails for any reason. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
1 parent 9205d13 commit 317edcf

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

xdp-trafficgen/tests/test-xdp-trafficgen.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ PIDS=""
66

77
skip_if_missing_kernel_support()
88
{
9-
$XDP_TRAFFICGEN probe
10-
ret=$?
11-
if [ "$ret" -eq "161" ]; then
12-
exit $SKIPPED_TEST
13-
elif [ "$ret" -ne "0" ]; then
14-
exit 1
15-
fi
9+
$XDP_TRAFFICGEN probe || exit $SKIPPED_TEST
1610
}
1711

1812
skip_if_missing_kernel_features()

0 commit comments

Comments
 (0)