mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
selftest: fib_tests: Always cleanup before exit
[ Upstream commitb60417a9f2
] 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 <roxana.nicolescu@canonical.com> Link: https://lore.kernel.org/r/20230220110400.26737-2-roxana.nicolescu@canonical.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2edd8c192f
commit
6720394087
1 changed files with 2 additions and 0 deletions
|
@ -2065,6 +2065,8 @@ EOF
|
|||
################################################################################
|
||||
# main
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
while getopts :t:pPhv o
|
||||
do
|
||||
case $o in
|
||||
|
|
Loading…
Reference in a new issue