On Fri, Sep 19, 2025 at 11:58:22AM +0200, 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 distributions: > > 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 >= 7.2, or one that contains commit > > 13c6be96618c ("net: stream: add unix socket"): this change introduces support > > @@ -81,7 +81,12 @@ The following additional packages are commonly needed: > > > > ## 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=1 enables debugging messages, TRACE=1 enables tracing > > > > PCAP=1 TRACE=1 ./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=967509), > > + 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 point 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 might be more common than us old-school Unix heads tend to think. > 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 ... Right. The whole point of passt/pasta is not to require root, so testing it as root means you're not really testing what it's intended to do. -- 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