2
0
mirror of git://github.com/lxc/lxc synced 2025-08-30 10:32:03 +00:00

tests: Kill containers (don't wait for shutdown)

We waste a lot of time waiting for Ubuntu containers to cleanly stop
right before we destroy them anyway.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2017-03-21 16:35:44 -04:00
parent f332b5d0a0
commit 09ef083882
No known key found for this signature in database
GPG Key ID: C638974D64792D67
3 changed files with 7 additions and 7 deletions

View File

@ -167,7 +167,7 @@ if [ "x$profile" != "x${default_profile}" ]; then
echo "FAIL: confined container was in profile $profile"
exit 1
fi
run_cmd lxc-stop -n $cname
run_cmd lxc-stop -n $cname -k
echo "test regular unconfined container"
echo "lxc.aa_profile = unconfined" >> $HDIR/.local/share/lxc/$cname/config
@ -179,7 +179,7 @@ if [ "x$profile" != "xunconfined" ]; then
echo "FAIL: unconfined container was in profile $profile"
exit 1
fi
run_cmd lxc-stop -n $cname
run_cmd lxc-stop -n $cname -k
echo "masking $MOUNTSR"
mount --bind $dnam $MOUNTSR
@ -209,7 +209,7 @@ if [ "x$profile" != "xunconfined" ]; then
echo "FAIL: confined container was in profile $profile"
exit 1
fi
run_cmd lxc-stop -n $cname
run_cmd lxc-stop -n $cname -k
echo "testing override"
sed -i '/aa_profile/d' $HDIR/.local/share/lxc/$cname/config
@ -226,6 +226,6 @@ if [ "x$profile" != "x${default_profile}" ]; then
echo "FAIL: confined container was in profile $profile"
exit 1
fi
run_cmd lxc-stop -n $cname
run_cmd lxc-stop -n $cname -k
DONE=1

View File

@ -48,5 +48,5 @@ lxc-checkpoint -n $name -v -s -D /tmp/checkpoint || FAIL "failed checkpointing"
lxc-wait -n $name -s STOPPED
lxc-checkpoint -n $name -v -r -D /tmp/checkpoint || FAIL "failed restoring"
lxc-stop -n $name -t 1
lxc-stop -n $name -k
lxc-destroy -f -n $name

View File

@ -185,7 +185,7 @@ for count in `seq 1 2`; do
run_cmd lxc-info -n c1
run_cmd lxc-attach -n c1 -- /bin/true
run_cmd lxc-stop -n c1
run_cmd lxc-stop -n c1 -k
done
run_cmd lxc-copy -s -n c1 -N c2
@ -193,7 +193,7 @@ run_cmd lxc-start -n c2 -d
p1=$(run_cmd lxc-info -n c2 -p -H)
[ "$p1" != "-1" ] || { echo "Failed to start container c2"; false; }
run_cmd lxc-stop -n c2
run_cmd lxc-stop -n c2 -k
if which cgm >/dev/null 2>&1; then
echo "Testing containers under different cgroups per subsystem"