]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
selftests/net: correct the return value for run_afpackettests
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Fri, 6 Dec 2019 12:07:00 +0000 (13:07 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:59 +0000 (14:21 -0300)
BugLink: https://bugs.launchpad.net/bugs/1825778
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>
(backported from commit 8c03557c3f25271e62e39154af66ebdd1b59c9ca)
[PHLin: backported with the same logic]
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
tools/testing/selftests/net/run_afpackettests

index 21fe149e3de1ea5abaaeee983944929086222751..f4abc9f9cfeb0d36788a6c20484d29740bcd7027 100755 (executable)
@@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
        exit 0
 fi
 
+ret=0
 echo "--------------------"
 echo "running psock_fanout test"
 echo "--------------------"
 ./psock_fanout
 if [ $? -ne 0 ]; then
        echo "[FAIL]"
+       ret=1
 else
        echo "[PASS]"
 fi
@@ -22,6 +24,8 @@ echo "--------------------"
 ./psock_tpacket
 if [ $? -ne 0 ]; then
        echo "[FAIL]"
+       ret=1
 else
        echo "[PASS]"
 fi
+exit $ret