aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc/igc_ptp.c
diff options
context:
space:
mode:
authorGuillaume Nault <[email protected]>2023-01-08 16:45:50 +0100
committerPaolo Abeni <[email protected]>2023-01-10 10:13:52 +0100
commitd68ff8ad3351b8fc8d6f14b9a4f5cc8ba3e8bd13 (patch)
treec6cced6fc42696f0fe875c04c7f909dbb36df796 /drivers/net/ethernet/intel/igc/igc_ptp.c
parentc53cb00f7983a5474f2d36967f84908b85af9159 (diff)
selftests/net: l2_tos_ttl_inherit.sh: Ensure environment cleanup on failure.
Use 'set -e' and an exit handler to stop the script if a command fails and ensure the test environment is cleaned up in any case. Also, handle the case where the script is interrupted by SIGINT. The only command that's expected to fail is 'wait $ping_pid', since it's killed by the script. Handle this case with '|| true' to make it play well with 'set -e'. Finally, return the Kselftest SKIP code (4) when the script breaks because of an environment problem or a command line failure. The 0 and 1 return codes should now reliably indicate that all tests have been run (0: all tests run and passed, 1: all tests run but at least one failed, 4: test script didn't run completely). Fixes: b690842d12fd ("selftests/net: test l2 tunnel TOS/TTL inheriting") Reported-by: Mirsad Goran Todorovac <[email protected]> Tested-by: Mirsad Goran Todorovac <[email protected]> Signed-off-by: Guillaume Nault <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_ptp.c')
0 files changed, 0 insertions, 0 deletions