Repository navigation
test(e2e): run own-ip cases on vm lanes when the host has no tun device - #2008
Conversation
The deny-all answer proof, the port-publish half and the min net expose case skipped whenever the host had no /dev/net/tun. On a VM lane the own-IP box opens its tap inside the Linux guest, which has the device, so the macOS VM lane never ran them. Gate the host check on a native lane, as the listen-published-port case already does. The fresh-install loopback publish, the network posture own-IP half and the box-name page check are native-only: they return early on a VM lane and open the tap on this host, so they keep the guard. Their skip text now says why the host device is required.
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 15 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe session end-to-end proofs now apply host TUN device checks only to native runs. A two-VM expose proof comment explains why the alpha VM uses a separate port. ChangesSession end-to-end proofs
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to VM-backed proofs use a guest-side tap, while native runs keep the host TUN check. No concrete merge-blocking risk is established by this change. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the tap at dawn Comment |
The group skipped on any host without /dev/net/tun, so the macOS VM lane never ran its expose legs. The own-IP box opens its tap inside the guest on a VM lane, so gate the skip on a native lane, as the other own-IP cases now are. Also correct the two-VM leg's comment: the default VM's boxes are gone by then, but their forwards can outlive them.
…macOS bash expands them Under a UTF-8 locale, bash 3.2 reads the en dash's lead byte as part of the name, so "$mnx_lo–$mnx_hi" trips set -u as an unbound "mnx_lo\xe2". The NET-043/NET-044 expose group only reached these lines once it ran on the macOS VM lane.
Summary
scripts/session-e2e.shskipped several own-IP cases whenever the host had no/dev/net/tun. On a VM lane, though, the own-IP box opens its tap inside the Linux guest, and the guest has the device. The host check was the wrong precondition there, so the macOS VM lane never ran these cases and said nothing about it. #1984 fixed the listen-published-port case. This PR applies the same guard to the other VM-capable cases:[ -z "${E2E_VM:-}" ] && [ ! -c /dev/net/tun ].The native-only cases keep their guard. Their skip text now says why they need the host device.
Per-site decisions
proof_own_ip_deny_all_box_answers_published_port)E2E_VMunset)MINVMD_GVPROXY_BIN, the VM switch. The case already has VM-lane branches: guest-side records, the host socket table on KVM, and a named skip of the forwarder-address leg on a macOS host. The box's tap opens in the guest.po_port_half)MINVMD_GVPROXY_BIN. It already handles a macOS VM host: "address legs SKIPPED on this lane ... this host has no /proc", and the by-name legs still run. The tap opens in the guest.min net expose(proof_min_net_expose_publishes_lists_and_refuses)E2E_VMbranch for the T94 host-held grant path. With a VM switch, the tap opens in the guest. On a native lane (E2E_NATIVE_SWITCH), the host check still applies.E2E_VMis set or the host is not Linux. It installs a pair host-side and runs the box natively, so the tap opens on this host.bn_tun)proof_expose_from_inside_box)[ -z "${E2E_VM:-}" ] && [ ! -c /dev/net/tun ](cc99ce5, after #2006 merged)eib_vm_ask_legsand the allow, deny and nobody-attached legs) opens the box's tap inside the guest. Before this change the macOS VM lane skipped every expose leg, so they were proven on KVM only. The same commit corrects the two-VM leg's comment: the default VM's boxes are destroyed by then, and the leg uses its own port because their forwards can outlive them.Validation
bash -n scripts/session-e2e.sh: syntax OK.shellcheck scripts/session-e2e.sh: no findings, exit 0. Nojustrecipe covers this script, so I ran it directly.just e2elocally, because it needs a booted VM. The CI lanes below are the proof.What CI proves
ci-macos-success, session e2e on the Apple Silicon runner): the macOS host has no/dev/net/tun. On this lane the deny-all answer proof, the port-publish half andmin net exposeshould now run instead of printing the host-tun SKIP line.ci-linux-kvm-success): the host has the device, so behaviour does not change there. It confirms nothing regressed.ci-linux-native-success):E2E_VMis unset there, so every guard behaves as before.Summary by CodeRabbit