aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2022-11-22 22:49:31 -0500
committerTheodore Ts'o <tytso@mit.edu>2022-11-22 22:49:31 -0500
commit72644561bf1836a3d86fb87d689f62bbb7167eab (patch)
tree0c346c58a996c7e029fe944b182988585fd3fe2f
parentf0214737d7895ae6b66fa7e1ae37b4152de8b0c8 (diff)
downloadxfstests-bld-72644561bf1836a3d86fb87d689f62bbb7167eab.tar.gz
gce-xfstests: fix ltm/kcs commands broken by OVERRIDE_KERNEL="none"
Some ltm and kcs commands use parse_cli, but do not specify a kernel because they are launching a ltm or kcs VM, or they are sending a command to the ltm or kcs VM. In that case OVERRIDE_KERNEL is set to "none" and KERNEL will be set to the default kernel build directory. If the latter does not exist, then get_kernel_file_info will fail, and abort gce-xfstests. Fix this by skipping the call to get_kernel_file_info if OVERRIDE_KERNEL is set to "none". Fixes: 966edd601810 ("run-fstests: get/infer the architecture from the kernel file") Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--run-fstests/util/parse_cli4
1 files changed, 3 insertions, 1 deletions
diff --git a/run-fstests/util/parse_cli b/run-fstests/util/parse_cli
index 02f326e8..9218d7e7 100644
--- a/run-fstests/util/parse_cli
+++ b/run-fstests/util/parse_cli
@@ -1091,7 +1091,9 @@ set_canonicalized_arch "$ARCH"
find_kernel_to_use
-get_kernel_file_info "$KERNEL"
+if test "$OVERRIDE_KERNEL" != "none" ; then
+ get_kernel_file_info "$KERNEL"
+fi
if test -n "$EXPLICIT_ARCH" ; then
if test "$ARCH" != "$KERNEL_ARCH" ; then
echo "Kernel $KERNEL is apparently built for $KERNEL_ARCH"