Skip to content

Commit

Permalink
selftests/net: correct the return value for run_afpackettests
Browse files Browse the repository at this point in the history
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 <po-hsu.lin@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Po-Hsu Lin authored and David S. Miller committed Apr 21, 2019
1 parent d1bcf2b commit 8c03557
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/testing/selftests/net/run_afpackettests
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
exit 0
fi

ret=0
echo "--------------------"
echo "running psock_fanout test"
echo "--------------------"
./in_netns.sh ./psock_fanout
if [ $? -ne 0 ]; then
echo "[FAIL]"
ret=1
else
echo "[PASS]"
fi
Expand All @@ -22,6 +24,7 @@ echo "--------------------"
./in_netns.sh ./psock_tpacket
if [ $? -ne 0 ]; then
echo "[FAIL]"
ret=1
else
echo "[PASS]"
fi
Expand All @@ -32,6 +35,8 @@ echo "--------------------"
./in_netns.sh ./txring_overwrite
if [ $? -ne 0 ]; then
echo "[FAIL]"
ret=1
else
echo "[PASS]"
fi
exit $ret

0 comments on commit 8c03557

Please sign in to comment.