From: Andrew Jones <andrew.jones@linux.dev>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Joel Stanley" <joel@jms.id.au>,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
"Alexandru Elisei" <alexandru.elisei@arm.com>,
"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
"David Hildenbrand" <david@redhat.com>,
"Eric Auger" <eric.auger@redhat.com>,
"Janosch Frank" <frankja@linux.ibm.com>,
"Nico Böhr" <nrb@linux.ibm.com>,
linux-s390@vger.kernel.org, kvmarm@lists.linux.dev,
kvm-riscv@lists.infradead.org
Subject: Re: [kvm-unit-tests PATCH 29/32] configure: Fail on unknown arch
Date: Wed, 28 Feb 2024 13:08:17 +0100 [thread overview]
Message-ID: <20240228-d598a1eb6a25935f54aeaa01@orel> (raw)
In-Reply-To: <20240226101218.1472843-30-npiggin@gmail.com>
On Mon, Feb 26, 2024 at 08:12:15PM +1000, Nicholas Piggin wrote:
> configure will accept an unknown arch, and if it is the name of a
> directory in the source tree the command will silently succeed. Make
> it only accept supported arch names.
>
> Also print the full path of a missing test directory to disambiguate
> the error in out of tree builds.
>
> Cc: Alexandru Elisei <alexandru.elisei@arm.com>
> Cc: Andrew Jones <andrew.jones@linux.dev>
> Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Janosch Frank <frankja@linux.ibm.com>
> Cc: Laurent Vivier <lvivier@redhat.com>
> Cc: Nico Böhr <nrb@linux.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: kvm@vger.kernel.org
> Cc: linux-s390@vger.kernel.org
> Cc: kvmarm@lists.linux.dev
> Cc: kvm-riscv@lists.infradead.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> configure | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 6907ccbbb..ae522c556 100755
> --- a/configure
> +++ b/configure
> @@ -45,7 +45,8 @@ usage() {
> Usage: $0 [options]
>
> Options include:
> - --arch=ARCH architecture to compile for ($arch)
> + --arch=ARCH architecture to compile for ($arch). ARCH can be one of:
> + arm, arm64, i386, ppc64, riscv32, riscv64, s390x, x86_64
> --processor=PROCESSOR processor to compile for ($arch)
> --target=TARGET target platform that the tests will be running on (qemu or
> kvmtool, default is qemu) (arm/arm64 only)
> @@ -321,11 +322,15 @@ elif [ "$arch" = "ppc64" ]; then
> elif [ "$arch" = "riscv32" ] || [ "$arch" = "riscv64" ]; then
> testdir=riscv
> arch_libdir=riscv
> +elif [ "$arch" = "s390x" ]; then
> + testdir=s390x
> else
> - testdir=$arch
> + echo "arch $arch is not supported!"
> + arch=
> + usage
> fi
> if [ ! -d "$srcdir/$testdir" ]; then
> - echo "$testdir does not exist!"
> + echo "$srcdir/$testdir does not exist!"
> exit 1
> fi
>
> --
> 2.42.0
>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
next prev parent reply other threads:[~2024-02-28 12:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240226101218.1472843-1-npiggin@gmail.com>
2024-02-26 10:12 ` [kvm-unit-tests PATCH 24/32] common/sieve: Use vmalloc.h for setup_mmu definition Nicholas Piggin
2024-02-28 12:03 ` Andrew Jones
2024-02-26 10:12 ` [kvm-unit-tests PATCH 29/32] configure: Fail on unknown arch Nicholas Piggin
2024-02-28 12:08 ` Andrew Jones [this message]
2024-02-26 10:12 ` [kvm-unit-tests PATCH 30/32] configure: Make arch_libdir a first-class entity Nicholas Piggin
2024-02-28 12:13 ` Andrew Jones
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=20240228-d598a1eb6a25935f54aeaa01@orel \
--to=andrew.jones@linux.dev \
--cc=alexandru.elisei@arm.com \
--cc=david@redhat.com \
--cc=eric.auger@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lvivier@redhat.com \
--cc=npiggin@gmail.com \
--cc=nrb@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=thuth@redhat.com \
/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