aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2022-11-26 11:54:33 -0500
committerTheodore Ts'o <tytso@mit.edu>2022-11-26 11:54:33 -0500
commitda33ab6c9dff3b51a34b0fe79564d8190e5f3b86 (patch)
tree46665bc1957c7bafda7741c20e7c342894f9bfa4
parent07f4472cf8cd4ad0ba8070d8809032b425a3e585 (diff)
downloadxfstests-bld-da33ab6c9dff3b51a34b0fe79564d8190e5f3b86.tar.gz
parse_cli: handle the case where the bzImage kernel is not in the build tree
The file(1) command can not distinguish between a 64-bit and a 32-bit kernel. So if the bzImage file is located in the build tree, we disambiguate betweeh these two cases by examining the .config file in the build tree. However, if the bzImage has been copied outside of the build tree, this trick won't work. So in that case, if the specified (or default) architecture is i386 or amd64, then assume that the x86 kernel is also that architecture. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--run-fstests/util/parse_cli4
1 files changed, 4 insertions, 0 deletions
diff --git a/run-fstests/util/parse_cli b/run-fstests/util/parse_cli
index 0a19e637..1dd0ec60 100644
--- a/run-fstests/util/parse_cli
+++ b/run-fstests/util/parse_cli
@@ -1095,6 +1095,10 @@ if test "$OVERRIDE_KERNEL" != "none" ; then
get_kernel_file_info "$KERNEL"
fi
if test -n "$KERNEL_ARCH" ; then
+ if test "$KERNEL_ARCH" = "x86" -a \
+ \( "$ARCH" = "i386" -o "$ARCH" = "amd64" \) ; then
+ KERNEL_ARCH="$ARCH"
+ fi
if test -n "$EXPLICIT_ARCH" ; then
if test "$ARCH" != "$KERNEL_ARCH" ; then
echo "Kernel $KERNEL is apparently built for $KERNEL_ARCH"