Repository navigation
test(minimald): put the QUIC block helper where root can exec it - #2859
Conversation
The pre-flip UDP 443 proof made the helper's directory with a hard-coded mktemp under /run. Some runners mount /run noexec, so sudo could not run the helper and the proof failed with Permission denied. Pick the directory from root-only candidates (/run, /var/lib, /root), skip any mounted noexec, and fail with each refusal named when none qualifies.
Findings
|
| Layer / File(s) | Summary |
|---|---|
Select and use a helper directory crates/minimald/tests/netns_root_integration.rs |
The new helper checks candidate ownership, permissions, mount options, and directory creation in order. The QUIC 443 proof uses the first successful directory instead of trying only /run. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Possibly related issues
- gominimal/minimal#2827: Reports a QUIC 443 test failure when
sudocannot execute a helper from/run; this change checks other candidate directories when/runis unsuitable.
Possibly related PRs
- gominimal/minimal#2819: Both changes modify the QUIC 443 proof in
netns_root_integration.rs; that PR retries helper launches and polls for the post-flip verdict.
Suggested reviewers: mitodrummer, bryan-minimal
Merge Risk: 
Low · up to a705d
-
The root integration test can still fail on certain host configurations. This is a bounded test-workflow risk.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title follows the Conventional Commit form
type(scope): summarywith a lower-case imperative subject and no trailing period. It names the main change: the QUIC block helper is placed in a directory where root can exec it. The raw summary and objectives confirm that the change adds a candidate-directory selection (/run,/var/lib,/root) that skips noexec mounts.
Full details: Description check
-
Explanation
The description covers the problem, cause, change, and test evidence. It follows the template's Summary and Testing sections and links the related issues. The Checklist section from the template is missing: it does not state whether docs were updated or whether a
BREAKING CHANGE:footer applies. The description uses the sections Cause, Change, Tests, and Not verified, which are not template headings. The Summary content is present, but it is placed under other headings. These gaps are minor, so the description is mostly complete.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A rabbit checks the paths in turn,
For one where helper files can run.
It tests the mount and permissions,
Then makes a directory with precision.
The QUIC proof hops along its way.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
|
Approved: no findings at Nothing to do. Clobber: none seen. |
Fixes the intermittent
minimald-root-integrationfailure ina_blocked_cohort_rejects_a_pre_flip_udp_443_socket(gominimal/inbox#1194, also filed as #2814):Cause
The proof made the helper's directory with a hard-coded
sudo -n mktemp -d /run/minimald-quic443-proof.XXXXXXand ranquic443-leaffrom it as root. On a runner whose/runis mountednoexec, that exec fails.proof_base_dir()already checks fornoexec, but this path skipped the check.proof_base_dir()'s candidates do not fit here. The installer accepts the helper only when its directory and every parent up to/are root-owned and not group- or other-writable (scripts/install-host-classifier.sh), and/tmp,/var/tmpand the target directory all fail that.Change
Test code only, in
crates/minimald/tests/netns_root_integration.rs. Product code installs the helper at/usr/local/lib/minimal/quic443-leafand is unchanged.quic443_helper_dir()tries/run,/var/liband then/root. It takes the first one that is root-owned, not group- or other-writable, and not on anoexecmount, then runssudo mktemp -dunder it.noexeccandidate is refused as "<dir>is mounted noexec on this runner, so root cannot execute the helper from it"./run, it prints the chosen directory and the refusals to stderr, asproof_base_dir()does.Tests
just fix: exit 0.just clippy: exit 0. On macOS that scope does not includeminimald.just test-cross: its clippy step (--all-targets -D warnings,minimaldtests included) passed, so the file compiles and is lint-clean on Linux musl. The run's test step then stopped incheckouts(git config insteadOf failed,crates/checkouts/src/lib.rs:1504), which this change does not touch. That failure looks specific to the Docker environment.Not verified
The root proof itself needs Linux root, nft and cgroup2 with nsdelegate. Only this PR's
minimald-root-integrationjob runs it. Whether/var/libor/rootqualifies on the runners where/runisnoexecis also shown only by that job.Summary by CodeRabbit