After a start that switches a Linux VM's project folder to cache none,
devvm checked the remount with findmnt -no OPTIONS, but the Alpine
--from base has no util-linux and busybox has no findmnt, so an Alpine
VM got an empty answer and was stopped with mount_cache_unchecked. The
guest now prints the folder's line of /proc/self/mountinfo, picked by a
POSIX awk (lastMount) that busybox runs: the last line whose mount
point is the folder exactly, as mountinfo escapes it (mountinfoPath:
\040, \011, \012, \134), which awk reads from the environment, as -v
would undo the escapes. devvm reads the mount's and its file system's
options from it (optionsOfMountinfo), refuses an answer that isn't a
mountinfo line, and keeps the 4 KiB cap, the last line and "unknown"
for a mode it doesn't know.
- TestOptionsOfMountinfo, TestMountinfoPath, TestLastMount: real lines,
9p with and without cache=0x5, Alpine's without optional fields,
stacked mounts, a path with a space; awk run on them.
- The stubs' guest answers with a mountinfo line; the start tests and
the mount_cache script check the new command.
- e2e: the from section's Alpine VM, given Lima's mmap with no mode
chosen, gets none from devvm mount-cache none at its next start on a
Linux host; the e2e helper reads mountinfo too.
- design.md and tests.md say how the check works and what e2e checks.
Co-Authored-By: Claude Opus 5.5 <[email protected]>