skip to content
[readonly]

The native lifecycle fixture: a mesh worker whose ops sleep, crash, allocate, fault, spin or exit on demand

sh
$ sexc add @ajax/mesh-test-worker
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 02:57v/# 1 version
  • drwxr-xr-x-Oct 27 02:57files/# the files of 0.1.0
latest
0.1.0, published Oct 27 02:57 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-worker ^0.1.0, @ajax/mesh-worker-ctx ^0.1.0, @ajax/mesh-abi-ops ^0.1.0, @ajax/mesh-check ^0.1.0
dependents
none yet
keywords
mesh alphaos worker native testing fixture
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/apps/mesh-test-worker
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-test-worker
2
3The 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).
8
9## Ported from
10
11[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
12crates/mesh-worker/src/bin/test_worker.rs.
13
14## Tests
15
16It is the subject of @ajax/mesh-native's lifecycle tests.
17
18## Licence
19
20MIT. See the repository's LICENSE.