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=YwTfyCcG; 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 3F3655A026F for ; Mon, 22 Sep 2025 05:03:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758510218; 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=vFFP31dFN9LWu3FSuSPJGQyeGozGimsWTT/CUFvs2Bw=; b=YwTfyCcGOLEqG2BNzpiksd+yJmAh70mDKu2N1zrgmYYR1Td/xXp/meIaemF9lGfHB1jmRP qvK4rvjAldGdTATt/YiyejSKSRhZ8ULlkF7zZuM76P0bIgL4IzpkmIFpQM84DaV/hhzgqd pqA/4RR3i9XPEStE4GBF7sp/g3AQCM0= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-281-GDhp4MDyNHqTVe6oDG4EaA-1; Sun, 21 Sep 2025 23:03:36 -0400 X-MC-Unique: GDhp4MDyNHqTVe6oDG4EaA-1 X-Mimecast-MFC-AGG-ID: GDhp4MDyNHqTVe6oDG4EaA_1758510215 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-b07cc3f115aso349525966b.3 for ; Sun, 21 Sep 2025 20:03:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758510215; x=1759115015; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vFFP31dFN9LWu3FSuSPJGQyeGozGimsWTT/CUFvs2Bw=; b=TQcqjWPp66rg4F138T4wKtzWtZtkRIDJ6HkRlrTEyeTiPUzT0QnJm/rHNqn6f6VjJD 8sHbo2aS4jYwfWmxgfUPu+Wa36ugsaxeDhF7b3a9gRuY9bxn/0aLEMlEgv4eUTPKUcRj i3GdgpT6/4BuK6rYN6rkNtnIblRs2Jr+QeTj/ut6q4PLvGzGpdyRxVpWlp8NbDKv6Fuj fsyqp/AoNHZy2ESCWt2cBRO+ZN6EtE1K9bOeNKaWPLP3jCtMisjyrCbnMELdAUzZ5aR3 Gvh7uXb8RTM7FADW2fowlgAqjWVdF0AZS3hW2TC+JzmAX8sxosdYyZhZ8/Gb7CGgAwca zl4g== X-Gm-Message-State: AOJu0YxgC/aCdgqUrapy7Se+sSSUoQsIP9ssOjvVr2kaWF+e76zcq8Ko Y0gnX9I/D5OrfMpcXz2i9KBjAw53GcCszcYK14Ew9hELom7oftrUBxMAprfstl6tDYDoLOwUrh8 kGkRTy1mjvZNZoxvhi4Oj3ksvqCckJwsYH5U5AKVM9mtwdG0TX9BK7Er/U2dPqdptx2PtIjL0jz AwZtwDzUiLhpDnvsDp3bgvptHWZUWS X-Gm-Gg: ASbGnctr8+guArmvCN72N25C0P5dH2p4pG70bxQ7LTb9ISRrsAMyi78UUWh/HH78gj1 vA13DJOKpON+u4d5rZBUlQj2zqzTwycg8buDhHnW/9VE/Z4TESnO0TxJ1yt/MlwBDZD1o9T51ZM HSET+qM+Qmmo0DTedoZX4VWA== X-Received: by 2002:a05:6402:3202:b0:62f:97ab:6062 with SMTP id 4fb4d7f45d1cf-62fc0a78c12mr12220271a12.32.1758510215284; Sun, 21 Sep 2025 20:03:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGi1cxJkma4hE2LZBy/YDps9m502H70ydt6TzRF6qIJz9RchZETQ7+KSJL6Ngct4/KZd1csHQYaCdDM2psJ+w= X-Received: by 2002:a05:6402:3202:b0:62f:97ab:6062 with SMTP id 4fb4d7f45d1cf-62fc0a78c12mr12220246a12.32.1758510214703; Sun, 21 Sep 2025 20:03:34 -0700 (PDT) MIME-Version: 1.0 References: <20250919014329.6007-1-yuhuang@redhat.com> <20250919115822.4e3aab21@elisabeth> In-Reply-To: <20250919115822.4e3aab21@elisabeth> From: Yumei Huang Date: Mon, 22 Sep 2025 11:03:23 +0800 X-Gm-Features: AS18NWAg-5db6MGTSsFcmSW1QXddrdMXpJ0TSyB47enBvsx4B-EycO4wMpPSgCQ Message-ID: Subject: Re: [PATCH] test: Update README.md To: Stefano Brivio X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: TFylFNCwXt-hfDInP1s2PcjO_Hfz7VlRGC_eDiSOGyg_1758510215 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: D52QM45PXJ3RCPXGR5IVRNCMNG6UMA72 X-Message-ID-Hash: D52QM45PXJ3RCPXGR5IVRNCMNG6UMA72 X-MailFrom: yuhuang@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: passt-dev@passt.top, david@gibson.dropbear.id.au 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 Fri, Sep 19, 2025 at 5:58=E2=80=AFPM Stefano Brivio = wrote: > > On Fri, 19 Sep 2025 09:43:29 +0800 > Yumei Huang wrote: > > > Signed-off-by: Yumei Huang > > --- > > test/README.md | 31 +++++++++++++++++++++++++++++-- > > 1 file changed, 29 insertions(+), 2 deletions(-) > > > > diff --git a/test/README.md b/test/README.md > > index 91ca603..e3e9d37 100644 > > --- a/test/README.md > > +++ b/test/README.md > > @@ -32,7 +32,7 @@ Example for Debian, and possibly most Debian-based di= stributions: > > git go iperf3 isc-dhcp-common jq libgpgme-dev libseccomp-dev linux= -cpupower > > lm-sensors lz4 netavark netcat-openbsd psmisc qemu-efi-aarch64 > > qemu-system-arm qemu-system-misc qemu-system-ppc qemu-system-x86 > > - qemu-system-x86 sipcalc socat strace tmux uidmap valgrind > > + sipcalc socat strace tmux uidmap valgrind > > > > NOTE: the tests need a qemu version >=3D 7.2, or one that contains com= mit > > 13c6be96618c ("net: stream: add unix socket"): this change introduces = support > > @@ -81,7 +81,12 @@ The following additional packages are commonly neede= d: > > > > ## Regular test > > > > -Just issue: > > +Before running the tests, you need to prepare the required assets: > > + > > + cd test > > + make assets > > + > > +Then issue: > > > > ./run > > > > @@ -91,6 +96,28 @@ variable settings: DEBUG=3D1 enables debugging messa= ges, TRACE=3D1 enables tracing > > > > PCAP=3D1 TRACE=3D1 ./run > > > > +**Note:** > > + > > +* It's recommended to run the commands as a non-root user. > > + Due to [Bug 967509](https://bugzilla.redhat.com/show_bug.cgi?id=3D96= 7509), > > + if you switch users with `su` or `sudo`, the directory `/run/user/ID= ` may > > + not be created. In that case, `XDG_RUNTIME_DIR` will incorrectly poi= nt to > > + `/run/user/0` instead of `/run/user/ID`, which can cause error. > > Thanks for the research, I wasn't aware of that, and recently spent > quite some time figuring that out (for other reasons): > > https://issues.redhat.com/browse/RHEL-70222 > > in that case, XDG_RUNTIME_DIR was simply not set. Things were working > with 'machinectl shell' instead. > > At the same time: running this whole stuff as root sounds rather crazy, > unless it's a throw-away VMs with absolutely nothing important on it. > > That is, regardless of the issue with XDG_RUNTIME_DIR. I would maybe > make the wording stronger, something like: > > * Don't run the tests as root, it's not needed! > * If you really need to, note that ... > > > + **Workaround:** Log out and log back in as the intended user to ensu= re the > > + correct runtime directory is set up. > > We could also suggest 'machinectl shell' if it's really needed for > whatever reason. I'm not sure how 'machinectl shell' works here. The error happens when running 'make assets', which calls 'prepare-distro-img.sh' script, which calls 'virsh edit'. If we run 'make assets' with root, the error is like this: ./prepare-distro-img.sh prepared-debian-8.11.0-openstack-amd64.qcow2 libguestfs: error: could not create appliance through libvirt. Original error from libvirt: Cannot access storage file '/home/test/passt/test/prepared-debian-8.11.0-openstack-amd64.qcow2' (as uid:107, gid:107): Permission denied [code=3D38 int1=3D13] If we switch to a non-root user via 'su', the error is like this: ./prepare-distro-img.sh prepared-debian-8.11.0-openstack-amd64.qcow2 libvirt: XML-RPC error : Cannot create user runtime directory '/run/user/0/libvirt': Permission denied libguestfs: error: could not connect to libvirt (URI =3D qemu:///session): Cannot create user runtime directory '/run/user/0/libvirt': Permission denied [code=3D38 int1=3D13] make: *** [Makefile:115: prepared-debian-8.11.0-openstack-amd64.qcow2] Erro= r 1 Do you mean to run 'make assets' with 'machinectl shell'? What's the exact cmd here? I tried this, seems not work. # machinectl shell --uid=3D$(id -u pat) .host /home/test/passt/test/make assets Connected to the local host. Press ^] three times within 1s to exit ses= sion. Connection to the local host terminated. > > > +* SELinux may prevent the tests from running correctly. To avoid this, > > + temporarily disable it by running: > > + > > + setenforce 0 > > By the way, other than the DHCP client not working on Fedora in a > namespace (which we should really fix, I can look into it if you share > the messages you're getting from /var/log/audit/audit.log), did you hit > any other issue with it? > Sure, I will send you a link containing the audit.log. BTW, if 'setenforce 1', the tests would get stuck at 'DHCPv6 :address'. Looks like an endless loop there. So except the very first few tests, other tests haven't been executed. =3D=3D=3D pasta/dhcp DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEBUG:DEB= UG:DEBUG:DEBUG:DEBUG:DEBUG:> Interface name DEBUG:DEBUG:? [ -n "eno8303" ] DEBUG:DEBUG:...passed. > DHCP: address DEBUG:DEBUG:DEBUG:DEBUG:? [ @EMPTY@ =3D 10.72.136.30 ] < failed. DEBUG:DEBUG:...failed. > DHCP: route DEBUG:DEBUG:DEBUG:? [ @EMPTY@ =3D 10.72.139.254 ] < failed. DEBUG:DEBUG:...failed. > DHCP: MTU DEBUG:DEBUG:? [ 1500 =3D 65520 ] < failed. DEBUG:DEBUG:...failed. > DHCPv6: address DEBUG: > I haven't tried running tests on Fedora for a long time now. > > > +* Some tests require a QEMU build that includes the following commits: > > + > > + 60f543ad917f ("virtio-net: vhost-user: Implement internal migr= ation") > > + 3f65357313e0 ("vhost: Add stubs for the migration state transf= er > > + interface") > > Given: > > $ git describe --contain 60f543ad917f 3f65357313e0 > v10.0.0-rc0~89^2~1 > v10.0.0-rc0~89^2~2 > > we might also save the reader from checking out a QEMU tree to check > and say something like "Some tests require a QEMU version >=3D 10.0.0, or > a build that includes ..." > Good idea! Will update in v2. > > + > > ## Running selected tests > > > > Rudimentary support to run a list of selected tests, without support f= or > > The rest looks good to me and it's an improvement on the original > anyway so I'm fine applying as it is, as well, but those few > suggestions shouldn't take that long either. Sure, those are good suggestions. Thanks! > > -- > Stefano > --=20 Thanks, Yumei Huang