selftests: openvswitch: Catch cases where the tests are killed
authorAaron Conole <aconole@redhat.com>
Wed, 11 Oct 2023 19:49:37 +0000 (15:49 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Oct 2023 19:02:51 +0000 (20:02 +0100)
In case of fatal signal, or early abort at least cleanup the current
test case.

Fixes: 25f16c873fb1 ("selftests: add openvswitch selftest suite")
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/openvswitch/openvswitch.sh

index 220c335..2a0112b 100755 (executable)
@@ -3,6 +3,8 @@
 #
 # OVS kernel module self tests
 
+trap ovs_exit_sig EXIT TERM INT ERR
+
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4