code wiki / (root) / nx_fsops_gate.nx

nx_fsops_gate.nx

buildroot/runtime/nx_fsops_gate.nx

10018 B170 linesdepth 4pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic fsops
docsdependenciesstructsconstsfunctions

about

nx_fsops_gate.nx -- gates the consolidated fs tool on synthetic fixtures, asserting RETURN VALUES: exact byte-count read, MARKED truncation, secret DENY (compiled default), DATA-DRIVEN deny toggled ON->OFF via fs_read_deny.conf (both directions = discriminating), absent-path grace, dir listing count. Runner must clean /tmp/fsgate first. The conf is written in CWD (prod lookup path) and REMOVED after. Exit 0 only on all-PASS. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_fsops_lib.nx nx_fio.nx nx_seg_store.nx nx_fsops_gate.nx

imports: nx_fsops_lib.nxnx_fio.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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

main sys_mkdir fio_unlink fg_write ss_writefile sys_openat_wr sys_write sys_close sys_fsync fg_check fsx_puts sys_write ↻ fsx_read fsx_denied sys_mmap fsx_lower fsx_ends_with vw_slen fsx_basename_is vw_slen ↻ fsx_ends_with ↻ fsx_deny_hit vw_slen ↻ vw_contains fsx_content_secret sys_openat_rd sys_mmap ↻ sys_read sys_close ↻ vw_contains ↻ fsx_conf_deny sys_mmap ↻ vw_read sys_openat_rd ↻ sys_read ↻ sys_close ↻ fsx_deny_hit ↻ fsx_puts ↻ sys_mmap ↻ vw_read ↻

structs

none

consts

10const GATE_CHECKS: i64 = 23
11const DIR_MODE: i64 = 0x1ed // 0755
12const FIX_BYTES: i64 = 9 // len("hello-fs\n")
13const SMALL_CAP: i64 = 4 // forces the truncation path
14const FIX_ENTRIES: i64 = 3 // files authored into the fixture dir
15const FG_RB_CAP: i64 = 256 // read-back buffer for write/edit content assertions

functions

18func fg_readback_eq(path: *u8, expect: *u8) -> i64
called by 1: main calls 2: vw_readfsx_seq
26func fg_check(name: *u8, ok: i64, pass: *i64) -> i64
called by 1: main calls 1: fsx_puts
31func fg_write(path: *u8, body: *u8) -> i64
called by 1: main calls 1: ss_writefile
37func fg_put(path: *u8, body: *u8) -> i64 { return fsx_write(path, body, vw_slen(body)) }
called by 1: main calls 2: fsx_writevw_slen
39func main(argc: i64, argv: *i64) -> i64