X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fns-ping.test;h=417ed32841c02bbe8c5b31e8948b497c76ea5cb8;hb=612ad2749ae504e6513748f881f0884ceeab2ed7;hp=5a5415cf0ff7462faad1d661d464911b960f0f6e;hpb=7b55200887d05c29abb8cea31aa914e03b806e9a;p=tinc diff --git a/test/ns-ping.test b/test/ns-ping.test index 5a5415cf..417ed328 100755 --- a/test/ns-ping.test +++ b/test/ns-ping.test @@ -1,72 +1,82 @@ #!/bin/sh -. "${0%/*}/testlib.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 <