From: Stéphane Graber Date: Tue, 21 Mar 2017 20:23:27 +0000 (-0400) Subject: tests: Support running on IPv6 networks X-Git-Tag: lxc-1.0.10~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ab76a7c4c5e4c071de2bddbc1edcecfecf996fb;p=thirdparty%2Flxc.git tests: Support running on IPv6 networks Signed-off-by: Stéphane Graber --- diff --git a/src/tests/lxc-test-ubuntu b/src/tests/lxc-test-ubuntu index ff716bc0c..004434621 100755 --- a/src/tests/lxc-test-ubuntu +++ b/src/tests/lxc-test-ubuntu @@ -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`