[PATCH v3 2/3] tests: vm: hide /var and /run entirely

Benjamin Berg benjamin at sipsolutions.net
Wed Jul 30 05:44:42 PDT 2025


From: Benjamin Berg <benjamin.berg at intel.com>

The systemd/udev code checks whether udev is running by looking for
/run/udev/control. If that is visible from the host, then it thinks that
udev works. With the next patch, the supplicant would wait indefinitely
for the udev add event after creating a new interface.

Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
---
 tests/hwsim/vm/inside.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index 31dfb9d570..f30b043c44 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -8,8 +8,11 @@ mount --bind /etc /tmp/etc
 mount tmpfs -t tmpfs /etc
 # we need our own /dev/rfkill, and don't want device access
 mount tmpfs -t tmpfs /dev
-# some sockets go into /var/run, and / is read-only
-mount tmpfs -t tmpfs /var/run
+# make /var and /run writable and hide the host data
+# /var/run is expected to be a symlink to /run
+mount tmpfs -t tmpfs /var
+mount tmpfs -t tmpfs /run
+ln -s /run /var/run
 mount proc -t proc /proc
 mount sysfs -t sysfs /sys
 # needed for tracing
-- 
2.50.1




More information about the Hostap mailing list