1# @ajax/mesh-test-worker
23The native lifecycle fixture: a mesh worker program whose ops do what lifecycle tests need. Op 0:
4`arg * 3 + 7 + 1000 * param` (two images tell apart); OP_INIT: the view magic `NNTW`; 3: sleep
5`arg` ms; 4: param; 5: the pid; 9: panic; 10: allocate and touch `arg` MiB (a memory cap kills it);
611: read past the view (a fault); 12: spin `arg` ms; 13: SIGTERM itself if `arg` is 0, else
7`exit(arg)`, mid-task. Its setup sleeps `MESH_TEST_SETUP_MS` (a slow model load).
89## Ported from
1011[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
12crates/mesh-worker/src/bin/test_worker.rs.
1314## Tests
1516It is the subject of @ajax/mesh-native's lifecycle tests.
1718## Licence
1920MIT. See the repository's LICENSE.