Skip to content

ci: instrument diod t0010 mount + prepare harden - #26

Merged
ericvh merged 16 commits into
mainfrom
ci/diod-mount-instrument-fix
Aug 26, 2026
Merged

ci: instrument diod t0010 mount + prepare harden#26
ericvh merged 16 commits into
mainfrom
ci/diod-mount-instrument-fix

Conversation

@ericvh

@ericvh ericvh commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Instrument t0010 first access=<uid> mount to capture stderr, dmesg, and diod server log into CI artifacts
  • Pre-create export dir before test_under_diod; pin version=9p2000.L; Defaults !requiretty
  • Force a fresh content-addressed build stamp so prepare patches are not stale

Test plan

  • Dispatch harness on this branch (kernel-latest)
  • Confirm diod-t0010-mount-debug.txt (and .diod.log) appear in diod-regression artifacts
  • Use captured error to land the real mount fix (follow-up commit or PR)

Made with Cursor

ericvh and others added 2 commits August 25, 2026 16:44
Capture mount stderr/dmesg/diod logs for the failing access=<uid>
mount under non-root v9fs, pin 9p2000.L, pre-create the export, and
avoid stale patched builds via a prepare stamp.

Co-authored-by: Cursor <cursoragent@cursor.com>
Multi-file grep -c prints per-file counts, so the remaining_unixsocket
equality check always failed even when every file was already patched.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericvh

ericvh commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Prepare aborted on a bogus multi-file grep -c check before the guest ran. Pushed a fix; waiting on the new push CI run for mount-debug artifacts.

ericvh and others added 2 commits August 25, 2026 16:50
With pipefail, grep exit status 1 on no matches aborted prepare
before autogen even though the unixsocketroot rewrite succeeded.

Co-authored-by: Cursor <cursoragent@cursor.com>
util-linux sudo mount post-check runs as root and fails with EPERM
after a successful 9p attach when access=<non-root uid>. Use capsh
to run mount/umount as the sharness user with CAP_SYS_ADMIN.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericvh

ericvh commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Mount-debug artifact from run 32903104031 shows attach/getattr succeed, then util-linux exits 1:

filesystem was mounted, but any subsequent operation failed: Operation not permitted.

That is sudo mount post-check as euid 0 under ACCESS_SINGLE. Follow-up commit uses capsh mount/umount as the test uid.

ericvh and others added 12 commits August 25, 2026 18:20
Non-root v9fs cannot set caps itself; use passwordless sudo capsh
so mount/umount run as the test uid with CAP_SYS_ADMIN.

Co-authored-by: Cursor <cursoragent@cursor.com>
capsh cannot set inheritable caps in the CI guest. Compile v9fs-mount-9p
and call it via sudo instead of util-linux mount(8) post-check.

Co-authored-by: Cursor <cursoragent@cursor.com>
sharness mounts with glued -oaname=...; the helper previously required
a separate -o argument and exited with usage.

Co-authored-by: Cursor <cursoragent@cursor.com>
setfsuid to access=<uid> before mount(2), fix /etc/mtab, line-buffer
make check, and lazily umount leftover unix 9p mounts so diod --socktest
cannot wedge diodrun after a per-test timeout.

Co-authored-by: Cursor <cursoragent@cursor.com>
diod-regression chroot lacked a real /proc, and a post-mount hang left
diodrun wedged on --socktest. Mount proc/sys/dev into the chroot, probe
stat/ls after mount, and wrap make check in timeout 1500.

Co-authored-by: Cursor <cursoragent@cursor.com>
After ACCESS_SINGLE mount succeeded, userspace stat of mnt hung with no
further 9p traffic — export and mountpoint lived on virtio-9p. Keep trash
under /tmp (tmpfs) so unix diod mounts are not nested.

Co-authored-by: Cursor <cursoragent@cursor.com>
After a successful ACCESS_SINGLE mount, t0010 can hang with diodrun
stuck on --socktest. Wrap each sharness script so timeout also umounts
/tmp trash mounts and pkills diod, letting make check continue.

Co-authored-by: Cursor <cursoragent@cursor.com>
Empty FAIL logs after SIGTERM were scoring as XFAIL pass. Fail those
runs, and wrap the next t0010 stat assertion in timeout + echo markers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep mount-test diagnostics on /tmp and stderr so a post-mount hang
cannot hide breadcrumbs behind block-buffered automake pipes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
t0010 runasuser is fully green. Extend v9fs-mount-9p to t0011–t0021,
drop debug breadcrumbs, and update XFAIL for remaining allsquash/acl
residuals (plus automake ERROR wrappers).

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericvh
ericvh merged commit c7af369 into main Aug 26, 2026
8 checks passed
@ericvh
ericvh deleted the ci/diod-mount-instrument-fix branch August 26, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant