aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2022-11-25 11:01:49 -0500
committerTheodore Ts'o <tytso@mit.edu>2022-11-25 11:01:49 -0500
commit47a7589701fd1aa8e4427e893c5b6ed5da6adadb (patch)
tree3c21abfd181bc65e55f941aafea959a2c0f8e6a7
parent7ccbe4af2e2c8f32e3c5c07f551829f4278be827 (diff)
downloadxfstests-bld-47a7589701fd1aa8e4427e893c5b6ed5da6adadb.tar.gz
parse_cli: handle the case where we can't get KERNEL_ARCH
This could happen if a kernel was uploaded to Google Cloud Storage without setting the metadata fields appropriately. In that case, fall back to the old behavior where we either use the default architecture or trust that the explicitly specified architecture is correct. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--run-fstests/util/parse_cli16
1 files changed, 9 insertions, 7 deletions
diff --git a/run-fstests/util/parse_cli b/run-fstests/util/parse_cli
index 861c3bc1..0a19e637 100644
--- a/run-fstests/util/parse_cli
+++ b/run-fstests/util/parse_cli
@@ -1094,14 +1094,16 @@ find_kernel_to_use
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"
- echo "Expected architecture: $ARCH"
- exit 1
+if test -n "$KERNEL_ARCH" ; then
+ if test -n "$EXPLICIT_ARCH" ; then
+ if test "$ARCH" != "$KERNEL_ARCH" ; then
+ echo "Kernel $KERNEL is apparently built for $KERNEL_ARCH"
+ echo "Expected architecture: $ARCH"
+ exit 1
+ fi
+ else
+ ARCH="$KERNEL_ARCH"
fi
-else
- ARCH="$KERNEL_ARCH"
fi
if test -n "$UPDATE_XFSTESTS_TAR" ; then