]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: Support running on IPv6 networks
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 21 Mar 2017 20:23:27 +0000 (16:23 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 22 Mar 2017 05:09:17 +0000 (01:09 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/tests/lxc-test-ubuntu

index ff716bc0ccf7da0ed15fabbc77e5f2cdc41b36cb..004434621bbc67d122615abfdb7e66e9423f5541 100755 (executable)
@@ -61,7 +61,12 @@ for template in ubuntu ubuntu-cloud; do
        done
        [ -n "$lxcip" ] || FAIL "to start networking in $template container"
 
-       ping -c 1 $lxcip || FAIL "to ping $template container"
+       if echo "${lxcip}" | grep -q ":"; then
+               ping6 -c 1 $lxcip || FAIL "to ping $template container"
+       else
+               ping -c 1 $lxcip || FAIL "to ping $template container"
+       fi
+
        # Check apparmor
        lxcpid=`lxc-info -n $name -p -H`
        aa=`cat /proc/$lxcpid/attr/current`