Single-directory package-test planner: discovers *.ww, groups white-box and external <pkg>_test sources, composes the combined test package, builds it through the sibling ww driver, and runs it with the runtime's -package/-list/-timeout-ms contract. test/package holds its E2E corpus and the manual runtime fixture set.
26 lines
603 B
Plaintext
26 lines
603 B
Plaintext
package descendant_test;
|
|
|
|
import os;
|
|
|
|
@test fn normal_return_clears_descendant() void = {
|
|
let ready: [2]i32;
|
|
assert(os.pipe(&ready) == 0);
|
|
let pid: i32 = os.fork();
|
|
assert(pid >= 0);
|
|
if (pid == 0) {
|
|
os.close(ready[0]);
|
|
let mask: u64 = 1u64 << ((os.SIGTERM - 1): u64);
|
|
if (os.sigprocmask(os.SIG_BLOCK, &mask, nil: *u64) != 0) {
|
|
os.exit(120);
|
|
};
|
|
let b: [1]u8 = [1u8];
|
|
if (os.write(ready[1], &b[0], 1u64) != 1i64) { os.exit(121); };
|
|
os.close(ready[1]);
|
|
for (true) { };
|
|
};
|
|
os.close(ready[1]);
|
|
let b: [1]u8;
|
|
assert(os.read(ready[0], &b[0], 1u64) == 1i64);
|
|
os.close(ready[0]);
|
|
};
|