From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202408 header.b=nodQngSn; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 562115A004C for ; Sun, 29 Sep 2024 08:41:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202408; t=1727592092; bh=yegVsQAqfS0wtDrkTPU9s5dgvEnMLW4L2jhhTyZtuoM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nodQngSn7e9wmNL3xXdbO2/kNGdx8bBRe1C9JQgbjUNjDgWW4Glyei6ydL3LT+5X5 OxS2gHNNELeOw+uCs49eIQ9JG7+wXZu+AZXd4bIvESJn5yvpDO6Up7eRN33pnIwrfo 5zCQPjBJLUCs+tdUr8cvEejPrA9EoeC7zOF2fnvyaE/63pVpE2MvedZEBdOxaQDEOs AfQjkQiRagH7KwxZnDgT0iLPnNrEn0nl1AobVE18FCcIF+Pu7KGrDsKvbrKUVtKsYX YanG3qyuCcd3/8NK/px8Tl5e6nwXXobDLoAla8GgABG0JbE+ioCM1SYy5iMLmHi86N NLOKni11f77EA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XGZNr6Msnz4x5M; Sun, 29 Sep 2024 16:41:32 +1000 (AEST) Date: Sun, 29 Sep 2024 16:21:30 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] test: Kernel binary can now be passed via the KERNEL environmental variable Message-ID: References: <20240927171714.1888509-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PbYItbpOJpxMUFGw" Content-Disposition: inline In-Reply-To: <20240927171714.1888509-1-sbrivio@redhat.com> Message-ID-Hash: HPNBXQPQ7K235KMJNZRYBKW2OLUK4HU2 X-Message-ID-Hash: HPNBXQPQ7K235KMJNZRYBKW2OLUK4HU2 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --PbYItbpOJpxMUFGw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 27, 2024 at 07:17:14PM +0200, Stefano Brivio wrote: > This is quite useful at least for myself as I'm usually running tests > using a guest kernel that's not the same as the one on the host. Hm. I don't love doing this without also altering the mbuto.img creation to use the same kernel. But.. it's hardly the only mucky thing about the makefiles so, Reviewed-by: David Gibson >=20 > Signed-off-by: Stefano Brivio > --- > test/lib/setup | 8 ++++---- > test/lib/term | 2 +- > test/run | 3 +++ > 3 files changed, 8 insertions(+), 5 deletions(-) >=20 > diff --git a/test/lib/setup b/test/lib/setup > index d764138..5338393 100755 > --- a/test/lib/setup > +++ b/test/lib/setup > @@ -58,7 +58,7 @@ setup_passt() { > context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}" \ > ' -machine accel=3Dkvm' \ > ' -m '${VMEM}' -cpu host -smp '${VCPUS} \ > - ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ > + ' -kernel '"${KERNEL}" \ > ' -initrd '${INITRAMFS}' -nographic -serial stdio' \ > ' -nodefaults' \ > ' -append "console=3DttyS0 mitigations=3Doff apparmor=3D0" ' \ > @@ -159,7 +159,7 @@ setup_passt_in_ns() { > ' -machine accel=3Dkvm' \ > ' -M accel=3Dkvm:tcg' \ > ' -m '${VMEM}' -cpu host -smp '${VCPUS} \ > - ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ > + ' -kernel '"${KERNEL}" \ > ' -initrd '${INITRAMFS}' -nographic -serial stdio' \ > ' -nodefaults' \ > ' -append "console=3DttyS0 mitigations=3Doff apparmor=3D0" ' \ > @@ -230,7 +230,7 @@ setup_two_guests() { > context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}" \ > ' -M accel=3Dkvm:tcg' \ > ' -m '${VMEM}' -cpu host -smp '${VCPUS} \ > - ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ > + ' -kernel '"${KERNEL}" \ > ' -initrd '${INITRAMFS}' -nographic -serial stdio' \ > ' -nodefaults' \ > ' -append "console=3DttyS0 mitigations=3Doff apparmor=3D0" ' \ > @@ -243,7 +243,7 @@ setup_two_guests() { > context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}" \ > ' -M accel=3Dkvm:tcg' \ > ' -m '${VMEM}' -cpu host -smp '${VCPUS} \ > - ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ > + ' -kernel '"${KERNEL}" \ > ' -initrd '${INITRAMFS}' -nographic -serial stdio' \ > ' -nodefaults' \ > ' -append "console=3DttyS0 mitigations=3Doff apparmor=3D0" ' \ > diff --git a/test/lib/term b/test/lib/term > index 3834092..0fa0936 100755 > --- a/test/lib/term > +++ b/test/lib/term > @@ -664,7 +664,7 @@ pause_continue() { > =20 > # run_term() - Start tmux session, running entry point, with recording i= f needed > run_term() { > - TMUX=3D"tmux new-session -s passt_test -eSTATEBASE=3D$STATEBASE -ePCAP= =3D$PCAP -eDEBUG=3D$DEBUG" > + TMUX=3D"tmux new-session -s passt_test -eSTATEBASE=3D$STATEBASE -ePCAP= =3D$PCAP -eDEBUG=3D$DEBUG -eKERNEL=3D$KERNEL" > =20 > if [ ${CI} -eq 1 ]; then > printf '\e[8;50;240t' > diff --git a/test/run b/test/run > index cd6d707..547a729 100755 > --- a/test/run > +++ b/test/run > @@ -38,6 +38,9 @@ TRACE=3D${TRACE:-0} > # If set, tell passt and pasta to take packet captures > PCAP=3D${PCAP:-0} > =20 > +# Custom kernel to boot guests with, if given > +KERNEL=3D${KERNEL:-"/boot/vmlinuz-$(uname -r)"} > + > COMMIT=3D"$(git log --oneline --no-decorate -1)" > =20 > . lib/util --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --PbYItbpOJpxMUFGw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmb48dcACgkQzQJF27ox 2Gc3Gg/+ObM58gARtY3G0PWYlJy3FOzerkUzSsU45nDTcB4q+3bqhRJMzW+r+C61 1stepu+BNlMx3+SmuH1fJ9X5DYOQKFRZ6/Syq3DQMwRbL/pI/psyvv25GYz9Q4tF 6au5/yO7eMxYnAB1duLjwaIDJaPCyEgGBIcbYorHPv2x37L5AJuJ6o53pPc25sOy uJQr6/VID3nkTy3MnKTaNBDoxg7XNvh4EmY5r3yqdSIfv3gc4uezG70kAYpYw9Jl oHcV+3FuZqbykm8Ykrkithq1juJEZYZFYb/6leNjdD29y9Uf35UoJTPik0wDhnCy oFwkRjNQPMsIdFE3ys7JMrlYlZVNpXmZWKwK/2bmy9hFKjhhUtMg1WwGs1Q1y1S4 0zf/0bgh+oq8ci+bSb4mJ2K6iSIRfBJvhQPd4N8URRDUIg4rnAOFZnerWClPt0+0 vOyfMUufVcBWk6XHbefWrOHm0+FkMZy5sh0OArPtqsOT/fcBbTp1Ywbl/JqsraI1 h/MzGUJXPdhNsEw7/XN/ImOzFuoqzmSjFL2RPcXek9h4nu9MQ3vxpgzDwlAZW2R+ n5XMgf9YsRBy3Tf/uqMzmz6fxFYM6dbqOqIK45sUaj2IYiqUmfoBGSyUBcNFwme5 ei8sLhQCmivt7hv6Lx678ugKZyHZnlr2vxM3KV8xHsZq6UJ+4Ew= =eOx6 -----END PGP SIGNATURE----- --PbYItbpOJpxMUFGw--