From: Serge Hallyn Date: Thu, 3 Mar 2016 00:17:17 +0000 (-0800) Subject: lxc-test-unpriv: try to start the container a second time X-Git-Tag: lxc-2.0.0.rc5~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F865%2Fhead;p=thirdparty%2Flxc.git lxc-test-unpriv: try to start the container a second time We have nothing else testing this, and it was a real regression in lp bug 1552355. Signed-off-by: Serge Hallyn --- diff --git a/src/tests/lxc-test-unpriv b/src/tests/lxc-test-unpriv index 141f50974..bb3660e04 100755 --- a/src/tests/lxc-test-unpriv +++ b/src/tests/lxc-test-unpriv @@ -125,15 +125,21 @@ run_cmd mkdir -p $HDIR/.cache/lxc chown -R $TUSER: $HDIR/.cache/lxc run_cmd lxc-create -t download -n c1 -- -d ubuntu -r trusty -a $ARCH -run_cmd lxc-start -n c1 -d -p1=$(run_cmd lxc-info -n c1 -p -H) -[ "$p1" != "-1" ] || { echo "Failed to start container c1"; false; } +# Make sure we can start it - twice -run_cmd lxc-info -n c1 -run_cmd lxc-attach -n c1 -- /bin/true +for count in `seq 1 2`; do + run_cmd lxc-start -n c1 -d + + p1=$(run_cmd lxc-info -n c1 -p -H) + [ "$p1" != "-1" ] || { echo "Failed to start container c1 (run $count)"; false; } + + run_cmd lxc-info -n c1 + run_cmd lxc-attach -n c1 -- /bin/true + + run_cmd lxc-stop -n c1 +done -run_cmd lxc-stop -n c1 run_cmd lxc-copy -s -n c1 -N c2 run_cmd lxc-start -n c2 -d p1=$(run_cmd lxc-info -n c2 -p -H)