From a17d94a593b0ca096690d70a25cf3d434fbbc813 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Wed, 2 Mar 2016 16:17:17 -0800 Subject: [PATCH] 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 --- src/tests/lxc-test-unpriv | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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) -- 2.47.2