Thread (15 messages) 15 messages, 2 authors, 2026-05-03

Re: [PATCH net-next v2 5/7] selftests: rds: Fix gcov and pcap collection

From: Allison Henderson <achender@kernel.org>
Date: 2026-05-02 05:43:06
Also in: linux-kselftest, linux-rdma

On Wed, 2026-04-29 at 19:48 -0700, Jakub Kicinski wrote:
On Wed, 29 Apr 2026 19:42:06 -0700 Jakub Kicinski wrote:
quoted
quoted
+# tcpdump saves pcaps to /tmp because it requires chown to save the
+# pcap but chown is not supported by 9p.  Mount tmpfs on /tmp if it is
+# not already a separate filesystem
+if ! mountpoint -q /tmp 2>/dev/null; then
+	mount -t tmpfs tmpfs /tmp
+fi
+  
Could this introduce a regression when the test is run directly on a host
workstation rather than inside an isolated VM?

If /tmp is a regular directory on the root filesystem, mounting tmpfs over it
will instantly hide all existing files and UNIX domain sockets in /tmp.

Since there is no cleanup trap to unmount it on exit or failure, does this
leave the host system in a degraded state?
I share Sashiko's mixed feelings here. Do other tests mount /tmp ?
Seems like something that belongs in the "CI setup", external
to ksft itself.
Ok, I did some looking around, and while I dont see any tests that mount /tmp, I did notice that mptcp_join.sh and
simult_flows.sh use a $SUDO_USER, presumably to get away from the chown issue. But without getting off the 9p fs
with some sort of scratch area, we still end up with empty pcaps.
point #2 my vng does have an overlayfs mounted over /tmp so the
mountpoint check doesn't trigger IDK if this is what you meant 
or I have a different version.
I did try using --overlay-rwdir, and I think that gives rw to the guest, but it's ro to the host, so we dont get to keep
the pcaps post mortem.

What we can do, if it sounds ok to you, is set up a temp scratch area in the rds_logs folder so it's not mounting over
/tmp, and then run.sh can handle the mount with a cleanup trap addressing Sashiko's concern

Let me know what you think?

Thank you for the reviews!
Allison
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help