From 00c21a652a98f6648cc03f0c32bf6d866b2f53c6 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Sat, 9 Jun 2018 12:47:46 +0100 Subject: [PATCH] tests: Fix wireguard test shutdown With PR #3030 the behaviour of poweroff/halt is changed. This test relies on on-shutdown containers to be executed to display the test result (service containers have their stdout redirected). Use 'poweroff' (note, no '-f') to ensure that: - the machine actually powers off - the on-shutdown container is executed Note, there are subtle differences between 'poweroff' and 'halt' between hypervisors. With HyperKit, 'halt' actually works, but with qemu/kvm, with 'halt' the process does not exit. Signed-off-by: Rolf Neugebauer --- test/cases/040_packages/023_wireguard/check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cases/040_packages/023_wireguard/check.sh b/test/cases/040_packages/023_wireguard/check.sh index 802131461..3db754942 100755 --- a/test/cases/040_packages/023_wireguard/check.sh +++ b/test/cases/040_packages/023_wireguard/check.sh @@ -20,8 +20,8 @@ fi # Nginx may not be up immediately as service startup is async for s in $(seq 1 10) do - wget -O - http://192.168.2.1/ && echo "success" > /tmp/ok && halt + wget -O - http://192.168.2.1/ && echo "success" > /tmp/ok && poweroff sleep 1 done -poweroff -f +poweroff