selftests/net: have `gro.sh -t` return a correct exit code
authorKevin Krakauer <krakauer@google.com>
Wed, 26 Feb 2025 19:27:23 +0000 (11:27 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 28 Feb 2025 02:38:23 +0000 (18:38 -0800)
Modify gro.sh to return a useful exit code when the -t flag is used. It
formerly returned 0 no matter what.

Tested: Ran `gro.sh -t large` and verified that test failures return 1.
Signed-off-by: Kevin Krakauer <krakauer@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250226192725.621969-2-krakauer@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/gro.sh

index 02c21ff4ca81fddc89ca697fe3d3f04a5dc792c8..aabd6e5480b8e59809711ca2d64f7df6f7f618f5 100755 (executable)
@@ -100,5 +100,6 @@ trap cleanup EXIT
 if [[ "${test}" == "all" ]]; then
   run_all_tests
 else
-  run_test "${proto}" "${test}"
+  exit_code=$(run_test "${proto}" "${test}")
+  exit $exit_code
 fi;