X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fns-ping.test;h=8e10d11ed064b331725ff12ce46490899aea5011;hb=344c632c7a9f8047a412239dcd22ba1531bdfda5;hp=417ed32841c02bbe8c5b31e8948b497c76ea5cb8;hpb=612ad2749ae504e6513748f881f0884ceeab2ed7;p=tinc diff --git a/test/ns-ping.test b/test/ns-ping.test index 417ed328..8e10d11e 100755 --- a/test/ns-ping.test +++ b/test/ns-ping.test @@ -1,11 +1,8 @@ #!/bin/sh -# shellcheck source=testlib.sh . ./testlib.sh -echo "[STEP] Skip this test if we aren't root or if 'ip netns' does not exist" - -test "$(id -u)" = "0" || exit $EXIT_SKIP_TEST +require_root "$0" "$@" test -e /dev/net/tun || exit $EXIT_SKIP_TEST ip netns list || exit $EXIT_SKIP_TEST