summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorPo-Hsu Lin <po-hsu.lin@canonical.com>2019-04-19 19:01:13 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-16 19:40:24 +0200
commit226ef4f27a451262bd6199fd0022aa22c4065393 (patch)
treee366b861a2247e9d999b4c1448b7b4443e607b17 /tools/testing
parent1a20185157b5b4204922cd7be240d83d451ef6a2 (diff)
selftests/net: correct the return value for run_afpackettests
[ Upstream commit 8c03557c3f25271e62e39154af66ebdd1b59c9ca ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/net/run_afpackettests5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/run_afpackettests b/tools/testing/selftests/net/run_afpackettests
index 2dc95fda7ef7..ea5938ec009a 100755
--- a/tools/testing/selftests/net/run_afpackettests
+++ b/tools/testing/selftests/net/run_afpackettests
@@ -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
@@ -22,6 +24,7 @@ echo "--------------------"
./in_netns.sh ./psock_tpacket
if [ $? -ne 0 ]; then
echo "[FAIL]"
+ ret=1
else
echo "[PASS]"
fi
@@ -32,6 +35,8 @@ echo "--------------------"
./in_netns.sh ./txring_overwrite
if [ $? -ne 0 ]; then
echo "[FAIL]"
+ ret=1
else
echo "[PASS]"
fi
+exit $ret