code wiki / (root) / nx_blob_store_mcu_test.nx

nx_blob_store_mcu_test.nx

buildroot/runtime/nx_blob_store_mcu_test.nx

7074 B158 linesdepth 7pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic blob
docsdependenciesstructsconstsfunctions

about

nx_blob_store_mcu_test.nx -- smoke for MCU-tier blob_store variant. Exercises: 1. Allocation + canary + initial state 2. Put + get roundtrip on a known sequence 3. DEDUP: same bytes twice -> same hash + count unchanged 4. Distinct bytes -> distinct hashes 5. has_blob positive + negative 6. SHA-256 determinism across two MCU stores 7. Bad-input gates (null bytes with len>0, negative len, null out_hash, null hash on get, null out_buf, undersized buffer) 8. MCU-specific OVERSIZED GATE: blob > 256 bytes -> NX_BLOB_MCU_TOO_BIG 9. CAPACITY GATE: put 4 distinct + try 5th -> NX_BLOB_MCU_FULL 10. TAMPER detection: canary stomp -> ops refuse 11. Empty-blob roundtrip + dedup 12. Sealed-enum verdict gate

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_blob_store.nx nx_blob_store_mcu.nx nx_blob_store_mcu_test.nx

imports: nx_syscalls.nxnx_blob_store.nxnx_blob_store_mcu.nx

imported by: nobody (leaf or entry point)

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

main nx_blob_store_mcu_new sys_mmap nx_blob_store_mcu_is_valid nx_blob_store_mcu_count nx_blob_store_mcu_is_valid ↻ sys_mmap ↻ _fill nx_blob_hash_new sys_mmap ↻ nx_blob_store_mcu_put nx_blob_store_mcu_is_valid ↻ _mcu_hash_bytes_to_struct sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word sha256_final blk_set_byte ↻ sha256_compress ↻ _mcu_load_i64_le _mcu_find_entry_idx _mcu_entry_hash_eq _mcu_alloc_entry sys_mmap ↻ nx_blob_store_mcu_get nx_blob_store_mcu_is_valid ↻ _mcu_find_entry_idx ↻ nx_blob_hash_eq nx_blob_store_mcu_has nx_blob_store_mcu_is_valid ↻ _mcu_find_entry_idx ↻

structs

none

consts

none

functions

22func _fill(buf: *u8, len: i64, seed: i64) -> i64
called by 1: main
31func main() -> i64