Commit 8c03557c authored by Po-Hsu Lin's avatar Po-Hsu Lin Committed by David S. Miller

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: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d1bcf2b6
...@@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then ...@@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
exit 0 exit 0
fi fi
ret=0
echo "--------------------" echo "--------------------"
echo "running psock_fanout test" echo "running psock_fanout test"
echo "--------------------" echo "--------------------"
./in_netns.sh ./psock_fanout ./in_netns.sh ./psock_fanout
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "[FAIL]" echo "[FAIL]"
ret=1
else else
echo "[PASS]" echo "[PASS]"
fi fi
...@@ -22,6 +24,7 @@ echo "--------------------" ...@@ -22,6 +24,7 @@ echo "--------------------"
./in_netns.sh ./psock_tpacket ./in_netns.sh ./psock_tpacket
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "[FAIL]" echo "[FAIL]"
ret=1
else else
echo "[PASS]" echo "[PASS]"
fi fi
...@@ -32,6 +35,8 @@ echo "--------------------" ...@@ -32,6 +35,8 @@ echo "--------------------"
./in_netns.sh ./txring_overwrite ./in_netns.sh ./txring_overwrite
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "[FAIL]" echo "[FAIL]"
ret=1
else else
echo "[PASS]" echo "[PASS]"
fi fi
exit $ret
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment