From patchwork Thu Oct 31 13:22:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 287487 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 4FE0B2C03A3 for ; Fri, 1 Nov 2013 00:22:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D6DE39D21C; Thu, 31 Oct 2013 09:22:36 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Zm-xwRDVnIb; Thu, 31 Oct 2013 09:22:36 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 4ACDA9D215; Thu, 31 Oct 2013 09:22:32 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A08D59D215 for ; Thu, 31 Oct 2013 09:22:29 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IfK+By2gbIRm for ; Thu, 31 Oct 2013 09:22:25 -0400 (EDT) Received: from sipsolutions.net (s3.sipsolutions.net [144.76.43.152]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 19BAE9D210 for ; Thu, 31 Oct 2013 09:22:25 -0400 (EDT) Received: by sipsolutions.net with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1VbsCd-0002k9-69; Thu, 31 Oct 2013 14:22:23 +0100 From: Johannes Berg To: hostap@lists.shmoo.com Subject: [PATCH] hwsim tests: allow setting KERNEL and KVMARGS Date: Thu, 31 Oct 2013 14:22:20 +0100 Message-Id: <1383225740-16334-1-git-send-email-johannes@sipsolutions.net> X-Mailer: git-send-email 1.8.4.rc3 Cc: Johannes Berg X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Johannes Berg Rather than just having KERNELDIR, allow setting KERNEL directly. Also remove the -s option that prevents running multiple machines at the same time, but add a KVMARGS= variable that can be used to restore that if needed. Signed-hostap: Johannes Berg --- tests/hwsim/vm/vm-run.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh index dfd8267..805fced 100755 --- a/tests/hwsim/vm/vm-run.sh +++ b/tests/hwsim/vm/vm-run.sh @@ -22,13 +22,18 @@ KVMOUT=ttyS1 # you can set EPATH if you need anything extra in $PATH inside the VM #EPATH=/some/dir +# extra KVM arguments, e.g. -s for gdbserver +#KVMARGS=-s + test -f vm-config && . vm-config -if [ -z "$KERNELDIR" ] ; then - echo "You need to set a KERNELDIR (in the environment or vm-config)" +if [ -z "$KERNEL" ] && [ -z "$KERNELDIR" ] ; then + echo "You need to set a KERNEL or KERNELDIR (in the environment or vm-config)" exit 2 fi -KERNEL=$KERNELDIR/arch/x86_64/boot/bzImage +if [ -z "$KERNEL" ] ; then + KERNEL=$KERNELDIR/arch/x86_64/boot/bzImage +fi CMD=$TESTDIR/vm/inside.sh @@ -37,7 +42,7 @@ mkdir -p $LOGDIR exec kvm \ -kernel $KERNEL -smp 4 \ - -s -m $MEMORY -nographic \ + $KVMARGS -m $MEMORY -nographic \ -fsdev local,security_model=none,id=fsdev-root,path=/$ROTAG \ -device virtio-9p-pci,id=fs-root,fsdev=fsdev-root,mount_tag=/dev/root \ -fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \