From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=afTvQvxw; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id B95005A0619 for ; Mon, 06 Oct 2025 10:31:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759739494; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QUlecrd47NK34DiCllAUF2n0dokMBkB0xeN03Ifl6TU=; b=afTvQvxw7ZYHbuV+EOAtZCr5XVaQ1hjVUsLgCbet35XGfeZvU17E+F0CiwQGEN50f3IQ7O gtcX3McYCflMuAIarzaAvzCHFhjId91Xe7X2rxzB2kMYEscTTGui6LXcTnEROY9W3gy9t3 vp6VlU+NHlTPHcYB1zmn5zxaJKMOw44= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-R0AVUKL5OnS_oRluQytnfA-1; Mon, 06 Oct 2025 04:31:33 -0400 X-MC-Unique: R0AVUKL5OnS_oRluQytnfA-1 X-Mimecast-MFC-AGG-ID: R0AVUKL5OnS_oRluQytnfA_1759739492 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3ece14b9231so2494444f8f.0 for ; Mon, 06 Oct 2025 01:31:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759739492; x=1760344292; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QUlecrd47NK34DiCllAUF2n0dokMBkB0xeN03Ifl6TU=; b=jB3+uTq/Gp403p/0pXdEeFlsSOqoOog3NamYXbA6+0LyCDkjVGR5NOXcT4aHQMG+aF yPf19rJfykwtqt1/QVy5sgRlQ0vZM9LHLoKD42PRO+XrUAu3fQ+/gsbtFGZw8AexWVlY BmNxyCaOMcczDYOBlyK3S6DVq0w84qhAHv3UbptLnNNNmMNK4NWk6QkKCwc6IyzFLtNo bdihj8jqN4Rdy+6cmsvedb9tWtiJJ90VQ3f4BmoyFIYwxLdmKj/fem9uX91p4r207Z2V aMSMvoCBmmeZ9rr5r1DLLn6pofIpmIrRcPWwV8bk7TYWThA5/Nawniwwy8hAvfim0Nkm nMZw== X-Forwarded-Encrypted: i=1; AJvYcCU53JeTLcOCu9Wh4NKfdQWmCClqVS7Fe7lerbicYuhUpxYOZ81UkHN8BrUbaQ1+naL8EFOdNop7vXI=@passt.top X-Gm-Message-State: AOJu0YyiSJp7Xbl4t7IJWdKKLmhc+2jv02YPQZhHteSqh2MkflpniXBK IDDK3YY+iQCN8TPDoDGScCyGfZps2zlRrIsFw8q59jbklAitaopVbBT43sY9K0AlX8RaCS7YCa8 I60c/pOupTRbNJL+t3N+u1T/xq9hHk/aCeeluLRynQ0xCip33ZJt93A== X-Gm-Gg: ASbGnctl+9fjc1t64S6dxGbfckQGGBytvYV4GT+slW/61ixemWoEBhyT07+dLsIhAP1 UFqOiqlT1y/pVmcIDm+jvId/UDLvafBbgq2QOO9/+qBnyJdOyXv4upOfpYo46aYYjkZKBgskYdl 8YjIdY+I+esQ5GpVOD1hen8JARy/CPkPoowc51qi04M9Eggr2QCCUIOg1p89zDKJxBW0SWzkLxX 234ABzhz5DlAiIP9wKbcZG/NkkY1AdQcXUTTHJYexzaVbxBXnkOkE2YmUk1Ko9Se5iXifiagrId t9boLFMUWeWJ8pbKdsZQrY9GYrC7GMkXKD9bfFwHzwlVTq8Q0TFoluKefW42knwFWOKugAWLdQ= = X-Received: by 2002:a05:6000:220b:b0:3eb:a237:a03c with SMTP id ffacd0b85a97d-42567193b3amr6959873f8f.51.1759739491980; Mon, 06 Oct 2025 01:31:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeS978S6fGg1bSwAoZoZuz4ZBNJ5EQI3lLzm6HABNZIobCHzryJlC9lcfUTQTGSMCNkKTVHA== X-Received: by 2002:a05:6000:220b:b0:3eb:a237:a03c with SMTP id ffacd0b85a97d-42567193b3amr6959850f8f.51.1759739491463; Mon, 06 Oct 2025 01:31:31 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6b40sm19769988f8f.2.2025.10.06.01.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Oct 2025 01:31:30 -0700 (PDT) Date: Mon, 6 Oct 2025 10:31:28 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] test: Update passt.mbuto and passt.mem.mbuto Message-ID: <20251006103128.43974db3@elisabeth> In-Reply-To: References: <20250930062952.17036-1-yuhuang@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: CnZ_b4a5PoJJFaIRugL3WkcgDAoz_o3tjFeVNxF2viI_1759739492 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: DWA4HW6PE4VPBLUEIHEJJKNPENRGZJFD X-Message-ID-Hash: DWA4HW6PE4VPBLUEIHEJJKNPENRGZJFD X-MailFrom: sbrivio@redhat.com 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: On Wed, 1 Oct 2025 10:31:10 +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 > > Signed-off-by: Yumei Huang > > --- > > 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