aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-07-06 00:11:01 -0400
committerTheodore Ts'o <tytso@mit.edu>2023-07-06 00:18:16 -0400
commitb7c348b96566555149a36809b84965b333cd8108 (patch)
treef3a969e317762dc30aaf9a2ba5a27c83762a6c58
parent9c911e52edb4cb96adab0c78482e6f54fe804647 (diff)
downloadxfstests-bld-b7c348b96566555149a36809b84965b333cd8108.tar.gz
test-appliances: allow for an asynchronous reboot command
Systemd's reboot command is not instaneous and will return after requesting systemd to reboot. This can take a second or two, during which the gce-load-kernel script will continue executing commands intended for the kexec option. Fix this by sleeping for a minute after the reboot command, and if the system is still running force an immediate reboot using "reboot -f" Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-xtest-appliance/files/usr/local/lib/gce-load-kernel4
1 files changed, 4 insertions, 0 deletions
diff --git a/test-appliance/files/usr/local/lib/gce-load-kernel b/test-appliance/files/usr/local/lib/gce-load-kernel
index 01737639..e3bbbbc6 100755
--- a/test-appliance/files/usr/local/lib/gce-load-kernel
+++ b/test-appliance/files/usr/local/lib/gce-load-kernel
@@ -169,6 +169,10 @@ EOF
grub-reboot "1>$menunum"
echo "Rebooting..."
reboot
+ sleep 60
+ echo "Forcing reboot after 60 seconds..."
+ reboot -f
+ sleep 60
fi
if ! test -f /root/bzImage