nx_tar_gate.nx
buildroot/runtime/nx_tar_gate.nx
about
nx_tar_gate.nx -- proves the USTAR reader/writer by ROUND-TRIP.
T4 builds a real two-file archive and walks it back, recovering both names,
both sizes and every content byte. Symmetric proof: only a correct pair can
pass, since a writer bug and a matching reader bug would still have to
agree with the absolute assertions in T1-T3.
T2 pins OCTAL, not binary: size 8 must be the ASCII digits "10", because
tar's numeric fields are octal text. A binary writer produces headers that
look fine in a hex dump and no tar on earth can read.
T6 pins the two-block terminator. One zero block is not an archive end;
readers scan for two.
T7 is the integrity proof: corrupt one header byte and the entry must be
REFUSED by checksum, then restored and re-accepted so the test is shown to
have measured that byte.
NON-VACUITY: T8 covers refusals -- an over-long name, an oversize field, a
short output buffer and a bad magic must each be rejected.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_tar.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
| none |
functions
| 26 | func g_puts(s: *u8) -> i64 |
| 33 | func g_putn(v: i64) -> i64 |
| 46 | func main() -> i64 |