From: Eric Biggers <ebiggers@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: fstests@vger.kernel.org
Subject: [xfstests-bld PATCH] run-fstests: don't assume that host system has dpkg
Date: Tue, 7 Feb 2023 23:01:50 -0800 [thread overview]
Message-ID: <20230208070150.229243-1-ebiggers@kernel.org> (raw)
From: Eric Biggers <ebiggers@google.com>
dpkg is generally only present on Debian-derived distros.
Fixes: 1efbdfd8c837 ("Use more general architecture handling")
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
run-fstests/util/arch-funcs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/run-fstests/util/arch-funcs b/run-fstests/util/arch-funcs
index 248a2a0..3933867 100644
--- a/run-fstests/util/arch-funcs
+++ b/run-fstests/util/arch-funcs
@@ -13,12 +13,16 @@
#
function set_my_arch () {
- local t
-
if test -n "${MY_ARCH:=}" ; then
return
fi
- MY_ARCH=$(dpkg --print-architecture)
+ local arch=$(uname -m)
+ case $arch in
+ aarch64) MY_ARCH=arm64 ;;
+ i386|i686) MY_ARCH=i386 ;;
+ x86_64) MY_ARCH=amd64 ;;
+ *) MY_ARCH=$arch ;;
+ esac
}
function set_default_arch ()
--
2.39.1
reply other threads:[~2023-02-08 7:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230208070150.229243-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox