[F/J/K][OEM-5.17/OEM-6.0][SRU][PATCH 0/1] selftest: fib_tests: Always cleanup before exit

Po-Hsu Lin po-hsu.lin at canonical.com
Wed Apr 12 05:06:46 UTC 2023


[Impact]
Copied from the commit message:
Usage of `set -e` before executing a command causes immediate exit
on failure, without cleanup up the resources allocated at setup.
This can affect the next tests that use the same resources,
leading to a chain of failures.

A simple fix is to always call cleanup function when the script exists.
This approach is already used by other existing tests.

[Fix]
* b60417a9f2 selftest: fib_tests: Always cleanup before exit

This patch can be cherry-picked into affected kernels.

[Test]
Run the patched fib_tests.sh on KVM kernels, which is expected to fail
due to bug 2007458.
Check with `ip netns`, the ns1 added during setup() should be removed.

[Where problems could occur]
Test robustness improvement, this should not break things.

Roxana Nicolescu (1):
  selftest: fib_tests: Always cleanup before exit

 tools/testing/selftests/net/fib_tests.sh | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.7.4




More information about the kernel-team mailing list