From nobody Wed Nov 09 21:12:19 2022 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N6yND6V2Nz4d8lg for ; Wed, 9 Nov 2022 21:12:28 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from mailgate.Leidinger.net (mailgate.leidinger.net [IPv6:2a00:1828:2000:313::1:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N6yND4zHxz4Lwp; Wed, 9 Nov 2022 21:12:28 +0000 (UTC) (envelope-from Alexander@leidinger.net) Authentication-Results: mx1.freebsd.org; none Received: from outgoing.leidinger.net (p508d4280.dip0.t-ipconnect.de [80.141.66.128]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) client-signature ECDSA (P-256)) (Client CN "outgoing.leidinger.net", Issuer "R3" (verified OK)) by mailgate.Leidinger.net (Postfix) with ESMTPSA id BD6A72287E; Wed, 9 Nov 2022 22:12:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1668028342; 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: in-reply-to:in-reply-to:references:references; bh=GEN+RXT2yNNb3jycqMObwhBkGYQyluUryflLBVKN14I=; b=ON+63j0unia0h1qcaBrPIpMelHE4LX8v4ThebN0dQXOd4k2rGHDekbopAfyULlRAspCsSu KYdybs6iQGy24dOhGKWcVuhBfHyU12R/pxJQTRJw+EK95xSCa8EVK2MZ8lxrnZwvZKTkUp OIldOumvNW5Eqic0W2AqX8mcG3pqy5dutV63mYj3iJO15coLVbNYw6ZX/zxP8QVYm5tVnm FDCO3lhtPZ6xCZ6s9MdzCn7LH9fx4owY5IIxHHo1ZhyN5JH960T5JbkLJtYHCKZrAezA/P UVdiakb7qToGFnuMnA72u6VAqn2bMstBazSRgdxMflfXFh6AnT5in590DbC+Rw== Received: from webmail.leidinger.net (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (Client did not present a certificate) by outgoing.leidinger.net (Postfix) with ESMTPS id 1AF12368E; Wed, 9 Nov 2022 22:12:20 +0100 (CET) Date: Wed, 09 Nov 2022 22:12:19 +0100 Message-ID: <20221109221219.Horde.rvKH8QoLi2iPD3JbQNgK1Yz@webmail.leidinger.net> From: Alexander Leidinger To: Warner Losh Cc: marklmi@yahoo.com, tsoome@freebsd.org, Li-Wen Hsu , current@freebsd.org Subject: Re: changes to the zfs boot (was: Re: git: 72a1cb05cd23 - main - rc(8): Add a zpoolupgrade rc.d script) References: <202211070339.2A73dJlO027991@gitrepo.freebsd.org> <20221107121514.Horde.nulS9Wg1s3yzAsXXkuJRBa9@webmail.leidinger.net> <20221108105053.Horde.eqgFiBJe2ngGAj6BkXcv5-Z@webmail.leidinger.net> <20221109134610.Horde.JB7ibQTWprHbmIUfhg7JY7f@webmail.leidinger.net> <20221109204736.Horde.u-t3-sSaTA023DA3Tib0oV4@webmail.leidinger.net> In-Reply-To: Accept-Language: de,en Content-Type: multipart/signed; boundary="=_Y0Eh2IHRBdvh11-EeVaXxnB"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 X-Rspamd-Queue-Id: 4N6yND4zHxz4Lwp X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34240, ipnet:2a00:1828::/32, country:DE] X-ThisMailContainsUnwantedMimeParts: N This message is in MIME format and has been PGP signed. --=_Y0Eh2IHRBdvh11-EeVaXxnB Content-Type: multipart/alternative; boundary="=_fsmWNBJQBYx6MobCfF_DBVM" This message is in MIME format. --=_fsmWNBJQBYx6MobCfF_DBVM Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Description: Textnachricht Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Warner Losh (from Wed, 9 Nov 2022 13:53:59 -0700= ): > =C2=A0 > > On Wed, Nov 9, 2022 at 12:47 PM Alexander Leidinger=20=20 >=20 wrote: > >> Quoting Warner Losh (from Wed, 9 Nov 2022 08:54:33 -070= 0): >> >>> as well. I'd settle for a good script that could be run as root (better >>> would be not as root) that would take a filesystem that was created >>> by makefs -t zfs and turn on these features after an zpool upgrade. >>> I have the vague outlines of a test suite for the boot loader that I >>> could see about integrating something like that into, but most of my >>> time these days is chasing after 'the last bug' in some kboot stuff I'm >>> working on (which includes issues with our ZFS in the boot loader >>> integration). >> >> How would you test a given image? bhyve/qemu/...? > > =C2=A0 > I have a script that creates a number of image files and a=20=20 >=20number of qemu scripts that look > like the following: > =C2=A0 > /home/imp/git/qemu/00-build/qemu-system-aarch64 -nographic -machine=20=20 >=20virt,gic-version=3D3 -m 512M -smp 4 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 -cpu cortex-a57 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 -drive=20=20 >=20file=3D/home/imp/stand-test-root/images/arm64-aarch64/linuxboot-arm64-a= arch64-zfs.img,if=3Dnone,id=3Ddrive0,cache=3Dwriteback=20=20 >=20\ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 -device virtio-blk,drive=3Ddrive0,bootindex= =3D0 \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 -drive=20=20 >=20file=3D/home/imp/stand-test-root/bios/edk2-arm64-aarch64-code.fd,format= =3Draw,if=3Dpflash=20=20 >=20\ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 -drive=20=20 >=20file=3D/home/imp/stand-test-root/bios/edk2-arm64-aarch64-vars.fd,format= =3Draw,if=3Dpflash=20=20 >=20\ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 -monitor telnet::4444,server,nowait \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 -serial stdio $* > =C2=A0 > There's a list of these files that's generated and looks to see=20=20 >=20if it gets to the 'success' echo in the minimal root I have for them. > =C2=A0 So a little script which makes a copy of a source image, enables=20=20 features=20on the copies and spits out a list of image files would suit=20= =20 your=20needs? e.g.: for feature A B C; do =C2=A0=C2=A0 # ignoring inter-feature dependencies for a moment =C2=A0 cp $source_image zfs_feature_$feature.img =C2=A0 pool_name =3D import_pool zfs_feature_$feature.img =C2=A0 enable_feature $pool_name $feature =C2=A0 export_pool $pool_name =C2=A0 echo zfs_feature_$feature.img done Bye, Alexander. --=20 http://www.Leidinger.net=20Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_fsmWNBJQBYx6MobCfF_DBVM Content-Type: text/html; charset=utf-8 Content-Description: HTML-Nachricht Content-Disposition: inline Content-Transfer-Encoding: quoted-printable

Quoting Warner Losh <imp@bsdimp.com= > (from Wed, 9 Nov 2022 13:53:59 -0700):

 

On Wed, Nov 9, 2022 at 12:47 PM Alexa= nder Leidinger <Alexander@lei= dinger.net> wrote:

Quoting Warner Losh <imp@bsdimp.com> (from Wed, 9 Nov 2022 08:54:33 -0700):

> as well. I'd settle for a good script that could be run as root (bette= r
> would be not as root) that would take a filesystem that was created > by makefs -t zfs and turn on these features after an zpool upgrade. > I have the vague outlines of a test suite for the boot loader that I > could see about integrating something like that into, but most of my > time these days is chasing after 'the last bug' in some kboot stuff I'= m
> working on (which includes issues with our ZFS in the boot loader
> integration).

How would you test a given image? bhyve/qemu/...?

 
I have a script that creates a number of image files and a number of q= emu scripts that look
like the following:
 
/home/imp/git/qemu/00-build/qemu-system-aarch64 -nographic -machine virt,gi= c-version=3D3 -m 512M -smp 4 \
        -cpu cortex-a57 \
        -drive file=3D/home/imp/stand-test-root/images/= arm64-aarch64/linuxboot-arm64-aarch64-zfs.img,if=3Dnone,id=3Ddrive0,cache= =3Dwriteback \
        -device virtio-blk,drive=3Ddrive0,bootindex=3D0= \
        -drive file=3D/home/imp/stand-test-root/bios/ed= k2-arm64-aarch64-code.fd,format=3Draw,if=3Dpflash \
        -drive file=3D/home/imp/stand-test-root/bios/ed= k2-arm64-aarch64-vars.fd,format=3Draw,if=3Dpflash \
        -monitor telnet::4444,server,nowait \
        -serial stdio $*
 
There's a list of these files that's generated and looks to see if it = gets to the 'success' echo in the minimal root I have for them.
 


So a little script which makes a copy of a source image, enables features o= n the copies and spits out a list of image files would suit your needs?
e.g.:
for feature A B C; do
   # ignoring inter-feature dependencies for a moment
  cp $source_image zfs_feature_$feature.img
  pool_name =3D import_pool zfs_feature_$feature.img
  enable_feature $pool_name $feature
  export_pool $pool_name
  echo zfs_feature_$feature.img
done

Bye,
Alexander.

--=_fsmWNBJQBYx6MobCfF_DBVM-- --=_Y0Eh2IHRBdvh11-EeVaXxnB Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIzBAABCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmNsF7MACgkQEg2wmwP4 2IaNnQ/8C4yTwyNPQXlTlEW1WlC+QVkbtImBmgyGqVX7ZUsPqMiFVAgm2+/74IFi wd+iyQtlLMZE5cnSbqmx8mITT3xbgIf9tazyyEccATYmhgIhbfKFo+xWz2WxFxh1 f7Ao1+fKb9N2sjzlxjeutiFntu1Ee3bHeMRllWUeRdMY6Mkj7IJJj2eStxp6vlJF whOwb2ZQvguVyuEqs98MMD/V66wDdL5qR8HihO48nqaDAFjGgH1QobVPLJtcHgC2 IIngQSsaidBo2RdbH5w0nZJF2MOH8koOtRJsos2ktfbrL7LJ48FLUBxV6nbCD9Q3 fb05AjZRWOY6W7Djy5zy7Qb1UBvHX0O9H8CJjNK9e2jcg5QhdWgxnsRFxbCw5blY 87QrPkPNGMCpQ1r/hpOhwR9uAKNNhZbRHutOLcLN9xi4KkoEXw7hMxmN5MLvlYEE RogaHXV1YcU7NPKf742/+uWoji4HCatJ/QfkpYEfVQhZub7oKOjyGc5xFfctsmhb hRyux+b/IxhIOJJ8YiZ0UrZgmI7ohuDQPS71XhCRKIyI0vL6W8GnhdlzK7OhrFof JUHuZ3ov/xRXtdqskKTxvxlF3pM+MJAj1ys7e6aL9g4GaPJEKAcHXADLRRLbNVuq 2T7lCdqvYgjAsGjvJM2yCY8ud7zTfOpFy+Z3oPto36mxaydn3KY= =uujD -----END PGP SIGNATURE----- --=_Y0Eh2IHRBdvh11-EeVaXxnB--