selftests/net: fix in_netns.sh script
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Tue, 6 Mar 2018 08:31:32 +0000 (17:31 +0900)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Mar 2018 17:26:05 +0000 (12:26 -0500)
execute the subprocess in netns using 'ip netns exec'

Fixes: cc30c93fa020 ("selftests/net: ignore background traffic in psock_fanout")
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/in_netns.sh

index f57a2eaad069303f5888d21fb333c43e03af5cb3..88795b510b32c02229a52e5441a048482fba7e93 100755 (executable)
@@ -19,5 +19,5 @@ cleanup() {
 trap cleanup EXIT
 setup
 
-"$@"
+ip netns exec "${NETNS}" "$@"
 exit "$?"