lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 20 Feb 2023 12:03:59 +0100
From:   Roxana Nicolescu <roxana.nicolescu@...onical.com>
To:     davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, shuah@...nel.org
Cc:     netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 0/1] selftest: fib_tests: Always cleanup before exit

Usually when a subtest is executed, setup and cleanup functions
are linearly called at the beginning and end of it.
In some of them, `set -e` is used before executing commands.
If one of the commands returns a non zero code, the whole script exists
without cleaning up the resources allocated at setup.
This can affect the next tests that use the same resources,
leading to a chain of failures.

To be consistent with other tests, calling cleanup function when the
script exists fixes the issue.

Steps to reproduce it:
1. Build with CONFIG_IP_ROUTE_MULTIPATH disabled.
2. Run net kselftest suite
3. fib_tests:fib_unreg_multipath_test fails when executing
`ip -netns ns1 route add 203.0.113.0/24 nexthop via 198.51.100.2 dev
dummy0 nexthop via 192.0.2.2 dev dummy1` because
CONFIG_IP_ROUTE_MULTIPATH is disabled.
This results in resources allocated during setup (e.g namespace ns1)
not being cleaned up.
4. When icmp.sh tries to create namespace ns1 during its setup, it fails
with the following error:
Cannot create namespace file "/run/netns/ns1": File exists

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

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

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ