With a configured build:
cmake --build --preset default --target snx-test-ldr-service snx-test-memory snx-test-runtime-nro \
snx-test-nro-modules snx-test-runtime-variants snx-test-jit-service
ctest --test-dir build/default -R '^(ldr_service|memory_accounting|runtime_nro|nro_modules|runtime_variants|jit_service)$' \
--output-on-failure
ldr_service uses synthetic images and the real service and memory block list. For an NRO made ahead of time it
covers the mapping at its address by its hash, the same address again after an unload, an NRO without a place kept
out of those addresses, an address in use (with the line that says so), a place of another size and one with no code
room. nro_modules recompiles a small extracted game and checks the table and each NRO's module, whose code must run
as code at its address and call the game's function and its own through its PLT, directly once bound and through
the table otherwise; runtime_variants loads such a module through guest_jit.c, and jit_service compiles into
the table from an image inside it.
It covers PID placeholders, initialization/handle validation, malformed ranges/headers/hash lists, hash snapshots,
unauthorized/duplicate images, commit failure rollback, permissions, preserved bytes/BSS, no premature
relocations, unload-by-base, copy-back, reloading, session cleanup, simultaneous loads, and both capacity limits.
Running code the module lacks (an NRO's, through RtAPI.miss) is native_module's.
SHA-256 has independent standard test vectors. Platform backing and IPC transport are test doubles.
Validation in the coding container: these three CTest targets passed using Clang 22. Service/memory tests passed GCC 14 ASan+UBSan. The runtime translation units changed here compiled with Clang's missing-prototype/declaration checks. No game dump was supplied, so no retail-game scene or full Vulkan runtime build was tested.
Made from docs/platforms/nx/nro.md at 69237645142c. GPL-3.0-or-later.