nx_zeroprint_gate.nx
buildroot/runtime/nx_zeroprint_gate.nx
about
nx_zeroprint_gate.nx -- teeth for nx_zeroprint (the zero-prints-as-NUL detector/repairer).
The subject's whole job is to tell four look-alike shapes apart, so the fixture carries ALL FOUR
and the gate asserts each bucket by name. Three of them MUST come back SAFE; a detector that
flagged them would be a false-positive generator, and the estate's own first census of this defect
(written in Python) did exactly that -- it could not see the else-form and over-counted by six.
EVERY FIXTURE IS ASSEMBLED AT RUNTIME under /tmp/nx_zeroprint_gate/, never shared with a beat and
never committed as a file: a detector that scans source WILL find its own test fixture, and a
fixture written into the tree would make this gate flag itself forever.
T1 is the anti-vacuity tooth: if the planted defect is NOT detected, nothing below proves anything.
license_tier: ORIGINAL
expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_tool_run.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 19 | const ZG_DIR: *u8 = "/tmp/nx_zeroprint_gate" as *u8 |
| 20 | const ZG_ELF: *u8 = "./nx_zeroprint.elf" as *u8 |
| 21 | const ZG_CAP: i64 = 65536 |
functions
| 23 | func zg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 24 | func zg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 25 | func zg_has(h: *u8, n: i64, needle: *u8) -> i64 |
| 38 | func zg_put(path: *u8, body: *u8) -> i64 |
| 45 | func zg_run(verb: *u8, out: *u8, olen: *i64) -> i64 |
| 54 | func main() -> i64 |