selftests: net: use setup_ns for bareudp testing
authorHangbin Liu <liuhangbin@gmail.com>
Thu, 8 May 2025 08:19:07 +0000 (08:19 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 13 May 2025 01:10:55 +0000 (18:10 -0700)
commit69ea46e7d00ec8b72f0c0c71569a8995bcc171ca
tree436b7968cbfdc603177c821e220d579fd57cc537
parent50ad88d57631b368906e6521947c0e8c2a95a895
selftests: net: use setup_ns for bareudp testing

Switch bareudp testing to use setup_ns, which sets up rp_filter by default.
This allows us to remove the manual rp_filter configuration from the script.

Additionally, since setup_ns handles namespace naming and cleanup, we no
longer need a separate cleanup function. We also move the trap setup earlier
in the script, before the test setup begins.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250508081910.84216-4-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/bareudp.sh