Commit e0283115 authored by Po-Hsu Lin's avatar Po-Hsu Lin Committed by Stefan Bader

selftests/net: correct the return value for run_netsocktests

BugLink: https://bugs.launchpad.net/bugs/1825777

The run_netsocktests will be marked as passed regardless the actual test
result from the ./socket:

    selftests: net: run_netsocktests
    ========================================
    --------------------
    running socket test
    --------------------
    [FAIL]
    ok 1..6 selftests: net: run_netsocktests [PASS]

This is because the test script itself has been successfully executed.
Fix this by exit 1 when the test failed.
Signed-off-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit 30c04d79)
Signed-off-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Acked-by: default avatarKleber Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent fc801f54
...@@ -6,7 +6,7 @@ echo "--------------------" ...@@ -6,7 +6,7 @@ echo "--------------------"
./socket ./socket
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "[FAIL]" echo "[FAIL]"
exit 1
else else
echo "[PASS]" echo "[PASS]"
fi fi
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