Skip to content

Commit

Permalink
selftests/net: correct the return value for run_netsocktests
Browse files Browse the repository at this point in the history
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: Po-Hsu Lin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Cypresslin authored and davem330 committed Apr 19, 2019
1 parent 36ad702 commit 30c04d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/run_netsocktests
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "--------------------"
./socket
if [ $? -ne 0 ]; then
echo "[FAIL]"
exit 1
else
echo "[PASS]"
fi

0 comments on commit 30c04d7

Please sign in to comment.