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=202510 header.b=mCzQ3bNH; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 0D99A5A0619 for ; Tue, 07 Oct 2025 05:58:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1759809500; bh=HuF0ytlBwtHf+kyWNhSpQJkq88JHOy3wldGrH/F+eec=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mCzQ3bNHoO4dgGOcXtERyqCDCJDYl3f+nF+L9SWdB0XUrsjjCByVgd20JT0D2tKjG yhjDztzQCPhyeI6b7WGTjwguUH2rhwSd8Dnq0NuA+4qpkrQvKG8SVx3p5kaqBaNwmX +2UufPVEhkoNYAP61Wqr4WiDric4lUmGOEXapmGIsDASyIrWZ+IG2kV65Elv7pT5zI 1VO66yWDmKClGmRg1XdDh4oQKpV55S9GvH0SO1rhH9BQ63JforFMbAJwh6YmGYVcDy maltugWhz/DG/jNIT5XOztqz0RhyhTvYe1JP0sD91DYTXwgKAX1Zqgvdi9ZjjWhJYa R7djwjxj7XCAg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cgj6N4WyHz4w9l; Tue, 7 Oct 2025 14:58:20 +1100 (AEDT) Date: Tue, 7 Oct 2025 14:58:09 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] test: Update passt.mbuto and passt.mem.mbuto Message-ID: References: <20250930062952.17036-1-yuhuang@redhat.com> <20251006103128.43974db3@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FGWlvntg13j4HInv" Content-Disposition: inline In-Reply-To: <20251006103128.43974db3@elisabeth> Message-ID-Hash: Q337DVC6QODIJVPKITSMSU5SR43KJFPR X-Message-ID-Hash: Q337DVC6QODIJVPKITSMSU5SR43KJFPR 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: Yumei Huang , 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: --FGWlvntg13j4HInv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 06, 2025 at 10:31:28AM +0200, Stefano Brivio wrote: > On Wed, 1 Oct 2025 10:31:10 +1000 > David Gibson wrote: >=20 > > On Tue, Sep 30, 2025 at 02:29:52PM +0800, Yumei Huang wrote: > > > If /bin is in the PATH of host, /usr/bin may not exist in mbuto > > > guest, which causes some binaries failing to move to /usr/bin. > > > As a result, tests fail as binaries not found. > > >=20 > > > Fix it by adding /usr/bin to DIRS. Also create the same symlink > > > for mbuto.mem.img. > > >=20 > > > Link: https://bugs.passt.top/show_bug.cgi?id=3D158 > > > Fixes: f4729be7a56b("test: Update mbuto profile to fix the symlink > > > of /bin") Suggested-by: David Gibson > > > Signed-off-by: Yumei Huang > > > --- > > > test/passt.mbuto | 2 +- > > > test/passt.mem.mbuto | 8 +++++--- > > > 2 files changed, 6 insertions(+), 4 deletions(-) > > >=20 > > > diff --git a/test/passt.mbuto b/test/passt.mbuto > > > index 231b9c9..598c254 100755 > > > --- a/test/passt.mbuto > > > +++ b/test/passt.mbuto > > > @@ -33,7 +33,7 @@ LINKS=3D"${LINKS:- > > > dhclient /usr/sbin/dhclient > > > sysctl /usr/sbin/sysctl}" > > > =20 > > > -DIRS=3D"${DIRS} /tmp /usr/sbin /usr/share /var/log /var/lib /etc/ssh > > > /run/sshd /root/.ssh" +DIRS=3D"${DIRS} /tmp /usr/sbin /usr/bin > > > /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh"=20 > > > COPIES=3D"${COPIES} small.bin,/root/small.bin > > > medium.bin,/root/medium.bin big.bin,/root/big.bin > > > rampstream,/bin/rampstream > > > rampstream-check.sh,/bin/rampstream-check.sh" diff --git > > > a/test/passt.mem.mbuto b/test/passt.mem.mbuto index > > > 532eae0..7554a43 100755 --- a/test/passt.mem.mbuto +++ > > > b/test/passt.mem.mbuto @@ -12,7 +12,7 @@ > > > =20 > > > PROGS=3D"${PROGS:-ash,dash,bash chmod ip mount insmod mkdir ln cat > > > chmod modprobe grep mknod sed chown sleep bc ls ps mount unshare > > > chroot cp kill diff > > > - head tail sort tr tee cut nm which switch_root}" > > > + head tail sort tr tee cut nm which switch_root mv rm}" > > > =20 > > > KMODS=3D"${KMODS:- dummy}" > > > =20 > > > @@ -22,12 +22,14 @@ LINKS=3D"${LINKS:- > > > ash,dash,bash /init > > > ash,dash,bash /bin/sh}" > > > =20 > > > -DIRS=3D"${DIRS} /tmp /sbin" > > > +DIRS=3D"${DIRS} /tmp /sbin /usr/bin" =20 > >=20 > > While we're changing this, we should probably standardize on using > > /usr/sbin for passt.mem.mbuto as well. I don't think it needs it at > > the moment, but since it bit us for passt.mbuto, it's just a problem > > waiting to happen. > >=20 > > In fact, I wonder if it would make sense to have mbuto unify /bin, > > /usr/bin, /sbin and /usr/sbin as part of its core. >=20 > Maybe optionally, or with a different handling of "LINKS", or some > "UNIFY" directive on its own? >=20 > I'm afraid it's not necessarily a generic approach as some use cases > expect binaries to be in a specific place, and not be links. The binaries themselves won't be links just the directories containing them. There might still be things that choke on that, but I expect there's rather less. > I never had time to commit a polished version of my local profile for > nftables, but I'm not sure things would work if we start moving things > around. >=20 > Maybe a -u / --unify switch would make things simple for the vast > majority of users though. >=20 > By the way, I still hope to make mbuto mostly obsolete, eventually, in > favour of muvm or similar (with changes to conveniently run arbitrary > kernels, have SSH over vsock, and vhost-user networking), but mbuto > still gives us a chance to use QEMU with (one day?) conveniently built > images for foreign architectures, libkrun definitely can't. Right. Yumei's trouble with this (plus those I encountered myself assisting with the debugging) have again reminded me of the fragility of mbuto's approach. I kind of want to get rid of it completely, except that it's so dang useful. --=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 --FGWlvntg13j4HInv Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjkj9AACgkQzQJF27ox 2GcjDA//Su6f1R+5PI4yBkzMYL6jZAvgBKK+U3QlitZT3HTK7iR4SdaV+P1garWy f+b82akIDzvqjAlUIV3uFWYDsUIC9B3ZxXFW1DkelJpj1LFuH5SiJ6bveAJXKc5H DP/xUrBFDBZHHWSw78rsGEj3UHMk0LzUop9Qm5DFoQqyQd5CY+ikTYWD7ujfP5xg eEUdOgwNX5+VsJxuq301AWWbBpbEgzWw4LDraubaeFH4pP3xQDGDFoZeSSihU0So ZwHGPc6JiJ+/uNBonJGj411lUbaTzyHUyfhwEqsEzGH0f4Dm/YMQAabpno5lLy23 xfROU6F0V+4/wsR9DRyyl6OuKgWXPbJvPihReK8UV4qWGiAc+gngerZ9Drklnsm4 rgbqG6xUPq1WA3XkR2TrwbFPynZ25UZORNOq95ktX9ogH2+b9szA2/GX7ERvFOUt gleJLQlmTquVMovOFQoTb4iQui7JPN2YETKxTGfN59rw8jpL3CH07fnoTpkvRsLl QdpNmWO+FenTIx8E7DQUVmw2BCuZJZi3AWwb+CLvThLlAbxrZgsWg4ox1BWm1Oag j3vurGm/l259ZwhBYKgO6Y75JntmZpRvKgF+wObSD0jnrnxPeFRqQERVilRkHy7b /PRokmQV4/w2jQgRKZK38JVXhnfGXok0mrun2WabsvP2cedVu8Y= =AOj7 -----END PGP SIGNATURE----- --FGWlvntg13j4HInv--