mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 11:03:37 +00:00
selftest: fib_tests: Always cleanup before exit
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.
Fixes: 1056691b26 ("selftests: fib_tests: Make test results more verbose")
Signed-off-by: Roxana Nicolescu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
This commit is contained in:
committed by
Paolo Abeni
parent
3a70e0d4c9
commit
b60417a9f2
@@ -2065,6 +2065,8 @@ EOF
|
||||
################################################################################
|
||||
# main
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
while getopts :t:pPhv o
|
||||
do
|
||||
case $o in
|
||||
|
||||
Reference in New Issue
Block a user