Commit b60417a9 authored by Roxana Nicolescu's avatar Roxana Nicolescu Committed by Paolo Abeni

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: 1056691b ("selftests: fib_tests: Make test results more verbose")
Signed-off-by: default avatarRoxana Nicolescu <roxana.nicolescu@canonical.com>
Link: https://lore.kernel.org/r/20230220110400.26737-2-roxana.nicolescu@canonical.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 3a70e0d4
......@@ -2065,6 +2065,8 @@ EOF
################################################################################
# main
trap cleanup EXIT
while getopts :t:pPhv o
do
case $o in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment