From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1715EC5478C for ; Wed, 28 Feb 2024 12:09:29 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=QkadKOx2; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TlCnz5BBcz3dHK for ; Wed, 28 Feb 2024 23:09:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=QkadKOx2; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.dev (client-ip=2001:41d0:203:375::bd; helo=out-189.mta1.migadu.com; envelope-from=andrew.jones@linux.dev; receiver=lists.ozlabs.org) Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [IPv6:2001:41d0:203:375::bd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TlCn86XMZz2xPV for ; Wed, 28 Feb 2024 23:08:44 +1100 (AEDT) Date: Wed, 28 Feb 2024 13:08:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709122101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XWNPrUUilCiI4A3q8yMqr9KSZvx9P8q/blhjVSX5ACU=; b=QkadKOx2gNNgsq2yDwtob8FGSV90oxh/Mm9+dXDQWYRBbhRN2s+9CyfKASe6R0jXjDwhBf 1CLyRhVsikkRtsk0zsmTjg6RAWAKZmYS2RPYAfdFbNLyhS7AiI8XcUy1a1CdOIJuEBBzzl +5wJ7NvO9qRVqytE1pirWcr63P6YX9U= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Andrew Jones To: Nicholas Piggin Subject: Re: [kvm-unit-tests PATCH 29/32] configure: Fail on unknown arch Message-ID: <20240228-d598a1eb6a25935f54aeaa01@orel> References: <20240226101218.1472843-1-npiggin@gmail.com> <20240226101218.1472843-30-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240226101218.1472843-30-npiggin@gmail.com> X-Migadu-Flow: FLOW_OUT X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , linux-s390@vger.kernel.org, Thomas Huth , Nico =?utf-8?B?QsO2aHI=?= , Janosch Frank , kvm@vger.kernel.org, David Hildenbrand , Alexandru Elisei , Eric Auger , Joel Stanley , kvm-riscv@lists.infradead.org, kvmarm@lists.linux.dev, Paolo Bonzini , Claudio Imbrenda , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 > Cc: Andrew Jones > Cc: Claudio Imbrenda > Cc: David Hildenbrand > Cc: Eric Auger > Cc: Janosch Frank > Cc: Laurent Vivier > Cc: Nico Böhr > Cc: Paolo Bonzini > Cc: Thomas Huth > 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 > --- > 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