code wiki / (root) / nx_cgroup_v2_probe_test.nx

nx_cgroup_v2_probe_test.nx

buildroot/runtime/nx_cgroup_v2_probe_test.nx

2694 B69 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_cgroup_v2_probe_test.nx -- smoke for cgroups v2 host detection. Honest scope: this smoke MUST pass green on ANY host. On hosts without cgroups v2 (Cygwin, Windows-mounted bash, macOS, Linux with v1 only) -> available() returns 0; the smoke verifies that path. On Linux hosts with cgroups v2 -> available() returns 1; the smoke verifies the controllers file has non-empty contents. Either path is GREEN. Refusing to fail on the unavailable path is the racing-line discipline: the probe is read-only; "not available here" is a legitimate state, not an error.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_cgroup_v2_probe.nx nx_cgroup_v2_probe_test.nx

imports: nx_syscalls.nxnx_cgroup_v2_probe.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_cgroup_v2_available sys_mmap _cg_path_controllers sys_openat_rd sys_read sys_close nx_cg_verdict_is_valid sys_mmap ↻ nx_cgroup_v2_controllers sys_mmap ↻ _cg_path_controllers ↻ sys_openat_rd ↻ sys_read ↻ sys_close ↻

structs

none

consts

none

functions

16func main() -> i64