diff --git a/tests/vm b/tests/vm index eb8dcf24..d08c6f52 100644 --- a/tests/vm +++ b/tests/vm @@ -21,16 +21,17 @@ if ! echo "${LXD_SNAP_CHANNEL}" | grep -qE '^4\.0/'; then lxc start vm1 waitInstanceBooted vm1 - # Try disconnecting a VM stopping forcefully and gracefully to make sure they match. - (sleep 1 && lxc stop -f vm1) & - lxc exec vm1 -- sleep 10 || exitCode=$? + echo "==> Test lxc exec exit code when stopping the VM cleanly" + (sleep 5 && lxc stop vm1) & + lxc exec vm1 -- sleep 60 || exitCode=$? [ "${exitCode:-0}" -eq 129 ] - wait $! + + echo "==> Test lxc exec exit code when stopping the VM abruptly" lxc start vm1 waitInstanceBooted vm1 - (sleep 1 && lxc stop vm1) & - lxc exec vm1 -- sleep 10 || exitCode=$? + (sleep 5 && lxc stop -f vm1) & + lxc exec vm1 -- sleep 60 || exitCode=$? [ "${exitCode:-0}" -eq 129 ] wait $! fi