X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fns-ping.test;h=54a9199c17e476ae83b0d8b20286210c63b2cbc8;hb=4fbaf80d56a418ebd23eeace9053fa8f20097f77;hp=43e1b20c8af861e3b3d33e1cafc2ec1ff0305a7a;hpb=ccb4fb6f7ac2efbb99d044aa072e75c035f504aa;p=tinc diff --git a/test/ns-ping.test b/test/ns-ping.test index 43e1b20c..54a9199c 100755 --- a/test/ns-ping.test +++ b/test/ns-ping.test @@ -1,70 +1,79 @@ #!/bin/sh +# shellcheck source=testlib.sh . ./testlib.sh -# Skip this test if we aren't root or if "ip netns" does not exist +echo "[STEP] Skip this test if we aren't root or if 'ip netns' does not exist" -test "`id -u`" = "0" || exit 77 -ip netns list || exit 77 +test "$(id -u)" = "0" || exit $EXIT_SKIP_TEST +test -e /dev/net/tun || exit $EXIT_SKIP_TEST +ip netns list || exit $EXIT_SKIP_TEST -# Initialize two nodes +ip_foo=192.168.1.1 +ip_bar=192.168.1.2 +mask=24 -$tinc $c1 <$d1/tinc-up <$d2/tinc-up <