]> 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>
Tue, 21 Mar 2017 20:23:27 +0000 (16:23 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/tests/lxc-test-ubuntu

index dc06804ebe8e2f7e41b6bb54735b6b36eb5f15a3..a5e620435f74ddd84d71fbd361625657759efd74 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`