Skip to content

Commit 8c03557

Browse files
Cypresslindavem330
authored andcommitted
selftests/net: correct the return value for run_afpackettests
The run_afpackettests will be marked as passed regardless the return value of those sub-tests in the script: -------------------- running psock_tpacket test -------------------- [FAIL] selftests: run_afpackettests [PASS] Fix this by changing the return value for each tests. Signed-off-by: Po-Hsu Lin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d1bcf2b commit 8c03557

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/testing/selftests/net/run_afpackettests

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
66
exit 0
77
fi
88

9+
ret=0
910
echo "--------------------"
1011
echo "running psock_fanout test"
1112
echo "--------------------"
1213
./in_netns.sh ./psock_fanout
1314
if [ $? -ne 0 ]; then
1415
echo "[FAIL]"
16+
ret=1
1517
else
1618
echo "[PASS]"
1719
fi
@@ -22,6 +24,7 @@ echo "--------------------"
2224
./in_netns.sh ./psock_tpacket
2325
if [ $? -ne 0 ]; then
2426
echo "[FAIL]"
27+
ret=1
2528
else
2629
echo "[PASS]"
2730
fi
@@ -32,6 +35,8 @@ echo "--------------------"
3235
./in_netns.sh ./txring_overwrite
3336
if [ $? -ne 0 ]; then
3437
echo "[FAIL]"
38+
ret=1
3539
else
3640
echo "[PASS]"
3741
fi
42+
exit $ret

0 commit comments

Comments
 (0)