* [PATCH] test: Update passt.mbuto and passt.mem.mbuto @ 2025-09-30 6:29 Yumei Huang 2025-10-01 0:31 ` David Gibson 2025-10-06 22:31 ` Stefano Brivio 0 siblings, 2 replies; 6+ messages in thread From: Yumei Huang @ 2025-09-30 6:29 UTC (permalink / raw) To: passt-dev, sbrivio; +Cc: david, yuhuang 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. Fix it by adding /usr/bin to DIRS. Also create the same symlink for mbuto.mem.img. Link: https://bugs.passt.top/show_bug.cgi?id=158 Fixes: f4729be7a56b("test: Update mbuto profile to fix the symlink of /bin") Suggested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Yumei Huang <yuhuang@redhat.com> --- test/passt.mbuto | 2 +- test/passt.mem.mbuto | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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="${LINKS:- dhclient /usr/sbin/dhclient sysctl /usr/sbin/sysctl}" -DIRS="${DIRS} /tmp /usr/sbin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" +DIRS="${DIRS} /tmp /usr/sbin /usr/bin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" COPIES="${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 @@ PROGS="${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}" KMODS="${KMODS:- dummy}" @@ -22,12 +22,14 @@ LINKS="${LINKS:- ash,dash,bash /init ash,dash,bash /bin/sh}" -DIRS="${DIRS} /tmp /sbin" +DIRS="${DIRS} /tmp /sbin /usr/bin" COPIES="${COPIES} ../passt.avx2,/bin/passt.avx2" FIXUP="${FIXUP}"' -ln -s /bin /usr/bin +mv /bin/* /usr/bin || : +rm -rf /bin +ln -s /usr/bin /bin chmod 777 /tmp sh +m ' -- 2.47.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] test: Update passt.mbuto and passt.mem.mbuto 2025-09-30 6:29 [PATCH] test: Update passt.mbuto and passt.mem.mbuto Yumei Huang @ 2025-10-01 0:31 ` David Gibson 2025-10-01 0:34 ` David Gibson 2025-10-06 8:31 ` Stefano Brivio 2025-10-06 22:31 ` Stefano Brivio 1 sibling, 2 replies; 6+ messages in thread From: David Gibson @ 2025-10-01 0:31 UTC (permalink / raw) To: Yumei Huang; +Cc: passt-dev, sbrivio [-- Attachment #1: Type: text/plain, Size: 2805 bytes --] 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. > > Fix it by adding /usr/bin to DIRS. Also create the same symlink > for mbuto.mem.img. > > Link: https://bugs.passt.top/show_bug.cgi?id=158 > Fixes: f4729be7a56b("test: Update mbuto profile to fix the symlink of /bin") > Suggested-by: David Gibson <david@gibson.dropbear.id.au> > Signed-off-by: Yumei Huang <yuhuang@redhat.com> > --- > test/passt.mbuto | 2 +- > test/passt.mem.mbuto | 8 +++++--- > 2 files changed, 6 insertions(+), 4 deletions(-) > > 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="${LINKS:- > dhclient /usr/sbin/dhclient > sysctl /usr/sbin/sysctl}" > > -DIRS="${DIRS} /tmp /usr/sbin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" > +DIRS="${DIRS} /tmp /usr/sbin /usr/bin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" > > COPIES="${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 @@ > > PROGS="${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}" > > KMODS="${KMODS:- dummy}" > > @@ -22,12 +22,14 @@ LINKS="${LINKS:- > ash,dash,bash /init > ash,dash,bash /bin/sh}" > > -DIRS="${DIRS} /tmp /sbin" > +DIRS="${DIRS} /tmp /sbin /usr/bin" 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. 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. > COPIES="${COPIES} ../passt.avx2,/bin/passt.avx2" > > FIXUP="${FIXUP}"' > -ln -s /bin /usr/bin > +mv /bin/* /usr/bin || : > +rm -rf /bin > +ln -s /usr/bin /bin > chmod 777 /tmp > sh +m > ' > -- > 2.47.0 > -- 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] test: Update passt.mbuto and passt.mem.mbuto 2025-10-01 0:31 ` David Gibson @ 2025-10-01 0:34 ` David Gibson 2025-10-06 8:31 ` Stefano Brivio 1 sibling, 0 replies; 6+ messages in thread From: David Gibson @ 2025-10-01 0:34 UTC (permalink / raw) To: Yumei Huang; +Cc: passt-dev, sbrivio [-- Attachment #1: Type: text/plain, Size: 2924 bytes --] On Wed, Oct 01, 2025 at 10:31:10AM +1000, David Gibson wrote: > 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. > > > > Fix it by adding /usr/bin to DIRS. Also create the same symlink > > for mbuto.mem.img. > > > > Link: https://bugs.passt.top/show_bug.cgi?id=158 > > Fixes: f4729be7a56b("test: Update mbuto profile to fix the symlink of /bin") > > Suggested-by: David Gibson <david@gibson.dropbear.id.au> > > Signed-off-by: Yumei Huang <yuhuang@redhat.com> > > --- > > test/passt.mbuto | 2 +- > > test/passt.mem.mbuto | 8 +++++--- > > 2 files changed, 6 insertions(+), 4 deletions(-) > > > > 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="${LINKS:- > > dhclient /usr/sbin/dhclient > > sysctl /usr/sbin/sysctl}" > > > > -DIRS="${DIRS} /tmp /usr/sbin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" > > +DIRS="${DIRS} /tmp /usr/sbin /usr/bin /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" > > > > COPIES="${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 @@ > > > > PROGS="${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}" > > > > KMODS="${KMODS:- dummy}" > > > > @@ -22,12 +22,14 @@ LINKS="${LINKS:- > > ash,dash,bash /init > > ash,dash,bash /bin/sh}" > > > > -DIRS="${DIRS} /tmp /sbin" > > +DIRS="${DIRS} /tmp /sbin /usr/bin" > > 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. > > 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. Remembered Yumei will be away for the next week or so. Maybe we want to merge as a partial fix anyway? So, Reviewed-by: David Gibson <david@gibson.dropbear.id.au> -- 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] test: Update passt.mbuto and passt.mem.mbuto 2025-10-01 0:31 ` David Gibson 2025-10-01 0:34 ` David Gibson @ 2025-10-06 8:31 ` Stefano Brivio 2025-10-07 3:58 ` David Gibson 1 sibling, 1 reply; 6+ messages in thread From: Stefano Brivio @ 2025-10-06 8:31 UTC (permalink / raw) To: David Gibson; +Cc: Yumei Huang, passt-dev On Wed, 1 Oct 2025 10:31:10 +1000 David Gibson <david@gibson.dropbear.id.au> wrote: > 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. > > > > Fix it by adding /usr/bin to DIRS. Also create the same symlink > > for mbuto.mem.img. > > > > Link: https://bugs.passt.top/show_bug.cgi?id=158 > > Fixes: f4729be7a56b("test: Update mbuto profile to fix the symlink > > of /bin") Suggested-by: David Gibson <david@gibson.dropbear.id.au> > > Signed-off-by: Yumei Huang <yuhuang@redhat.com> > > --- > > test/passt.mbuto | 2 +- > > test/passt.mem.mbuto | 8 +++++--- > > 2 files changed, 6 insertions(+), 4 deletions(-) > > > > 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="${LINKS:- > > dhclient /usr/sbin/dhclient > > sysctl /usr/sbin/sysctl}" > > > > -DIRS="${DIRS} /tmp /usr/sbin /usr/share /var/log /var/lib /etc/ssh > > /run/sshd /root/.ssh" +DIRS="${DIRS} /tmp /usr/sbin /usr/bin > > /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" > > COPIES="${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 @@ > > > > PROGS="${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}" > > > > KMODS="${KMODS:- dummy}" > > > > @@ -22,12 +22,14 @@ LINKS="${LINKS:- > > ash,dash,bash /init > > ash,dash,bash /bin/sh}" > > > > -DIRS="${DIRS} /tmp /sbin" > > +DIRS="${DIRS} /tmp /sbin /usr/bin" > > 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. > > 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. Maybe optionally, or with a different handling of "LINKS", or some "UNIFY" directive on its own? 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. 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. Maybe a -u / --unify switch would make things simple for the vast majority of users though. 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. It will probably be a huge hack, but being able to quickly check things like with: qemu-system-armhf -kernel arch/arm/boot/zImage -initrd $(mbuto -a armv6l -p passt) -nodefaults -nographic -append console=ttyAMA0 -serial stdio ... still looks extremely convenient to me. Not to mention that over the clumsiness of test/distro (or any equivalent). -- Stefano ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] test: Update passt.mbuto and passt.mem.mbuto 2025-10-06 8:31 ` Stefano Brivio @ 2025-10-07 3:58 ` David Gibson 0 siblings, 0 replies; 6+ messages in thread From: David Gibson @ 2025-10-07 3:58 UTC (permalink / raw) To: Stefano Brivio; +Cc: Yumei Huang, passt-dev [-- Attachment #1: Type: text/plain, Size: 4235 bytes --] On Mon, Oct 06, 2025 at 10:31:28AM +0200, Stefano Brivio wrote: > On Wed, 1 Oct 2025 10:31:10 +1000 > David Gibson <david@gibson.dropbear.id.au> wrote: > > > 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. > > > > > > Fix it by adding /usr/bin to DIRS. Also create the same symlink > > > for mbuto.mem.img. > > > > > > Link: https://bugs.passt.top/show_bug.cgi?id=158 > > > Fixes: f4729be7a56b("test: Update mbuto profile to fix the symlink > > > of /bin") Suggested-by: David Gibson <david@gibson.dropbear.id.au> > > > Signed-off-by: Yumei Huang <yuhuang@redhat.com> > > > --- > > > test/passt.mbuto | 2 +- > > > test/passt.mem.mbuto | 8 +++++--- > > > 2 files changed, 6 insertions(+), 4 deletions(-) > > > > > > 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="${LINKS:- > > > dhclient /usr/sbin/dhclient > > > sysctl /usr/sbin/sysctl}" > > > > > > -DIRS="${DIRS} /tmp /usr/sbin /usr/share /var/log /var/lib /etc/ssh > > > /run/sshd /root/.ssh" +DIRS="${DIRS} /tmp /usr/sbin /usr/bin > > > /usr/share /var/log /var/lib /etc/ssh /run/sshd /root/.ssh" > > > COPIES="${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 @@ > > > > > > PROGS="${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}" > > > > > > KMODS="${KMODS:- dummy}" > > > > > > @@ -22,12 +22,14 @@ LINKS="${LINKS:- > > > ash,dash,bash /init > > > ash,dash,bash /bin/sh}" > > > > > > -DIRS="${DIRS} /tmp /sbin" > > > +DIRS="${DIRS} /tmp /sbin /usr/bin" > > > > 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. > > > > 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. > > Maybe optionally, or with a different handling of "LINKS", or some > "UNIFY" directive on its own? > > 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. > > Maybe a -u / --unify switch would make things simple for the vast > majority of users though. > > 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. -- 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] test: Update passt.mbuto and passt.mem.mbuto 2025-09-30 6:29 [PATCH] test: Update passt.mbuto and passt.mem.mbuto Yumei Huang 2025-10-01 0:31 ` David Gibson @ 2025-10-06 22:31 ` Stefano Brivio 1 sibling, 0 replies; 6+ messages in thread From: Stefano Brivio @ 2025-10-06 22:31 UTC (permalink / raw) To: Yumei Huang; +Cc: passt-dev, david On Tue, 30 Sep 2025 14:29:52 +0800 Yumei Huang <yuhuang@redhat.com> 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. > > Fix it by adding /usr/bin to DIRS. Also create the same symlink > for mbuto.mem.img. > > Link: https://bugs.passt.top/show_bug.cgi?id=158 > Fixes: f4729be7a56b("test: Update mbuto profile to fix the symlink of /bin") > Suggested-by: David Gibson <david@gibson.dropbear.id.au> > Signed-off-by: Yumei Huang <yuhuang@redhat.com> Applied. Yumei, please don't forget to follow up about David's comment once you get back to this. -- Stefano ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-10-07 3:58 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-09-30 6:29 [PATCH] test: Update passt.mbuto and passt.mem.mbuto Yumei Huang 2025-10-01 0:31 ` David Gibson 2025-10-01 0:34 ` David Gibson 2025-10-06 8:31 ` Stefano Brivio 2025-10-07 3:58 ` David Gibson 2025-10-06 22:31 ` Stefano Brivio
Code repositories for project(s) associated with this public inbox https://passt.top/passt This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for IMAP folder(s).