X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fns-ping.test;h=8e10d11ed064b331725ff12ce46490899aea5011;hb=09dda64ce99668c918fada04b9ad6bf9cd2ab104;hp=49204367734beeb00a727270e213a601c6609b86;hpb=a0baeddb8aa745007d0302ed06247cabb8facb32;p=tinc diff --git a/test/ns-ping.test b/test/ns-ping.test index 49204367..8e10d11e 100755 --- a/test/ns-ping.test +++ b/test/ns-ping.test @@ -1,70 +1,79 @@ #!/bin/sh -. "${0%/*}/testlib.sh" +. ./testlib.sh -# Skip this test if we aren't root or if "ip netns" does not exist +require_root "$0" "$@" +test -e /dev/net/tun || exit $EXIT_SKIP_TEST +ip netns list || exit $EXIT_SKIP_TEST -test "`id -u`" = "0" || exit 77 -ip netns list || exit 77 +ip_foo=192.168.1.1 +ip_bar=192.168.1.2 +mask=24 -# Initialize two nodes +echo [STEP] Create network namespaces -$tinc $c1 <$d1/tinc-up <$d2/tinc-up <