selftests: net: fix setup_ns usage in rtnetlink.sh
authorPaolo Abeni <pabeni@redhat.com>
Thu, 1 Feb 2024 18:42:39 +0000 (19:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 3 Feb 2024 05:11:07 +0000 (21:11 -0800)
commitd75df752647728c6d65e594e5e4493448bea6cda
tree615ac81fda22147395576771ea74cd53424cb0b3
parentcb9f4a30fb85e1f4f149ada595a67899adb3db19
selftests: net: fix setup_ns usage in rtnetlink.sh

The setup_ns helper marks the testns global variable as
readonly. Later attempts to set such variable are unsuccessful,
causing a couple test failures.

Avoid completely the variable re-initialization and let the
function access the global value.

Fixes: e9ce7ededf14 ("selftests: rtnetlink: use setup_ns in bonding test")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/6e7c937c8ff73ca52a21a4a536a13a76ec0173a8.1706812005.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/rtnetlink.sh