aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-07-07 23:20:04 -0400
committerTheodore Ts'o <tytso@mit.edu>2023-07-08 23:21:21 -0400
commit0ba4879844870720c3aa3ac262e1881166bc4838 (patch)
tree78f1fb7439ba9d327bc81eb05381c1b76f21409a
parent63f9e1bc204f751b529714f7d63bd6ca70d6a560 (diff)
downloadxfstests-bld-0ba4879844870720c3aa3ac262e1881166bc4838.tar.gz
test-appliance: add better debuggability for gce-load-kernel.log
Since the gce-load-kernel script often ends with a "reboot", nothing ever gets written to the gce-load-kernel.log file. Fix this by using "script -f", and while we're at it, move the check whether gce-load-kernel has already populated the command line with the fstestcfg parameter to kvm-xfstests.boot, so that we don't end up calling the script on subsequent reboots. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-xtest-appliance/files/root/kvm-xfstests.boot6
-rwxr-xr-xtest-appliance/files/usr/local/lib/gce-load-kernel2
2 files changed, 6 insertions, 2 deletions
diff --git a/test-appliance/files/root/kvm-xfstests.boot b/test-appliance/files/root/kvm-xfstests.boot
index 8137936f..c806f14c 100755
--- a/test-appliance/files/root/kvm-xfstests.boot
+++ b/test-appliance/files/root/kvm-xfstests.boot
@@ -66,7 +66,11 @@ then
exit $?
fi
- script -a -c /usr/local/lib/gce-load-kernel /var/log/gce-load-kernel.log
+ if ! grep -q fstestcfg /proc/cmdline
+ then
+ script -a -f -c /usr/local/lib/gce-load-kernel \
+ /var/log/gce-load-kernel.log
+ fi
. /run/test-env
# for interactive mounting using the fstab entries
ln -s "$PRI_TST_DEV" /dev/vdb
diff --git a/test-appliance/files/usr/local/lib/gce-load-kernel b/test-appliance/files/usr/local/lib/gce-load-kernel
index e3bbbbc6..1ce6d2b6 100755
--- a/test-appliance/files/usr/local/lib/gce-load-kernel
+++ b/test-appliance/files/usr/local/lib/gce-load-kernel
@@ -8,7 +8,7 @@
. /usr/local/lib/gce-funcs
-if grep -q fstestcfg /proc/cmdline; then exit 0; fi
+set -vx
if test -f /root/do_kexec ; then
/usr/local/lib/gce-logger do_kexec file found, using it