nx_enginelab_driver_gate.nx
buildroot/runtime/nx_enginelab_driver_gate.nx
about
nx_enginelab_driver_gate.nx -- END-TO-END gate for nx_enginelab, THE DRIVER.
WHAT THIS PROVES THAT nx_enginelab_gate CANNOT. That gate asserts arithmetic properties of the
instrument library on fixtures built in memory, and says so in its own verdict: "fixtures whose
answers are known by construction". It therefore passes exactly as well when NOTHING drives the
library over a real frame -- which is the state the estate was in until nx_enginelab existed. This
gate forks the DEPLOYED driver against the REAL engine and asserts on its published report, so a
green here means a real renderer was really measured.
EVERY TOOTH BINDS TO A DENOMINATOR. A report block that was never printed parses as -1 here, never
as 0, so a tooth cannot pass because a field was missing: the field helpers return -1 for "the tag
was not printed" and -1 for "the key was not on that tag's line", and the teeth test for positive
values. THE FIXTURE-REACHED-THE-CONDITION TEETH COME FIRST and assert the subprocess actually ran
and produced bytes, because a harness failure returns an empty capture that would otherwise make
every absence-shaped assertion below vacuously true.
PARSING IS TAG-ANCHORED AND LINE-BOUNDED. The driver prints several blocks that share key names
(q= appears on SUBJECT and on every JOIN row; draws= appears on JOIN and on the named-absence row),
so an unanchored search would read one block's data as another's. gdrv_field finds the TAG, bounds
itself to that tag's line, and only then looks for the key -- the same positional discipline
gv_last_line uses for verdicts.
SCRATCH IS PRIVATE AND UNDER /tmp. A gate that shares scratch with a production beat measures the
fixture instead of the code; this one writes only under GDRV_DIR, created at SETUP (a teardown does
not run when a run crashes).
license_tier: ORIGINAL No hardware writes (Rule 26): forks a read-only measurement organ.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 38 | const GDRV_SUBJ_REL: *u8 = "_offc/nx_enginelab.elf" |
| 39 | const GDRV_SUBJ_ABS: *u8 = "/volume1/homes/elderwesto/nishihost/_offc/nx_enginelab.elf" |
| 40 | const GDRV_STATBUF: i64 = 256 |
| 41 | const GDRV_DIR: *u8 = "/tmp/nx_enginelab_driver_gate" |
| 42 | const GDRV_CAPFILE: *u8 = "/tmp/nx_enginelab_driver_gate/roundtrip.elc" |
| 44 | const GDRV_BADPATH: *u8 = "/tmp/nx_enginelab_driver_gate/no_such_dir/deep.elc" |
| 45 | const GDRV_MODE_0755: i64 = 493 |
| 46 | const GDRV_OUTCAP: i64 = 32768 |
| 47 | const GDRV_ARGVMAX: i64 = 16 |
| 52 | const GDRV_Q_FAST: i64 = 8 |
| 53 | const GDRV_Q_MID: i64 = 4 |
| 54 | const GDRV_FRAMES: i64 = 3 |
| 55 | const GDRV_V: i64 = 2 |
| 56 | const GDRV_GRID: i64 = 8 |
| 57 | const GDRV_THRESH: i64 = 4 |
| 60 | const GDRV_EXIT_OK: i64 = 0 |
| 61 | const GDRV_EXIT_FAIL: i64 = 1 |
| 62 | const GDRV_EXIT_USAGE: i64 = 2 |
| 63 | const GDRV_EXIT_UNMEASURABLE: i64 = 3 |
| 64 | const GDRV_ASCII_0: i64 = 48 |
| 65 | const GDRV_ASCII_9: i64 = 57 |
| 66 | const GDRV_NL: i64 = 10 |
| 67 | const GDRV_DEC: i64 = 10 |
| 68 | const GDRV_NOTFOUND: i64 = -1 |
| 69 | const GDRV_MINUS_CH: i64 = 45 |
| 70 | const GDRV_NS_PER_US: i64 = 1000 |
| 71 | const GDRV_PERMIL_FULL: i64 = 1000 |
| 73 | const GDRV_MIN_CELLS: i64 = 1 |
functions
| 76 | func gdrv_exists(p: *u8) -> i64 |
| 83 | func gdrv_subject() -> *u8 |
| 87 | func gdrv_resolved() -> i64 |
| 93 | func gdrv_buf() -> *u8 { return sys_mmap(GDRV_OUTCAP) } |
| 94 | func gdrv_len() -> *i64 { return sys_mmap(16) as *i64 } |
| 97 | func gdrv_lit_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 100 | func gdrv_find(buf: *u8, n: i64, from: i64, lit: *u8) -> i64 |
| 119 | func gdrv_count(buf: *u8, n: i64, lit: *u8) -> i64 |
| 131 | func gdrv_eol(buf: *u8, n: i64, from: i64) -> i64 |
| 140 | func gdrv_int_at(buf: *u8, n: i64, at: i64) -> i64 |
| 157 | func gdrv_field(buf: *u8, n: i64, tag: *u8, key: *u8) -> i64 |
| 167 | func gdrv_field_nth(buf: *u8, n: i64, tag: *u8, key: *u8, nth: i64) -> i64 |
| 185 | func gdrv_num_str(v: i64) -> *u8 |
| 200 | func gdrv_run(a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, a7: *u8, buf: *u8, lenp: *i64) -> i64 |
| 216 | func gdrv_pos(v: i64) -> i64 { if v > 0 { return 1 } return 0 } called by 1: main |
| 217 | func gdrv_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 218 | func gdrv_eq2(a: i64, b: i64, c: i64, d: i64) -> i64 { if a == b { if c == d { return 1 } } return 0 } called by 1: main |
| 219 | func gdrv_eq3(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64 called by 1: main |
| 222 | func gdrv_eq4(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64, g: i64, h: i64) -> i64 called by 1: main |
| 225 | func gdrv_has(buf: *u8, n: i64, lit: *u8) -> i64 |
| 230 | func main() -> i64 |