MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / run_example_in_kernel

Function run_example_in_kernel

tests/integration/kernel_integration.rs:158–162  ·  view source on GitHub ↗

Compile a hosted program and inject it as pid 1 (no FS image), then assert a clean spawn-and-exit.

(user_src: &str, label: &str)

Source from the content-addressed store, hash-verified

156 matches!(outcome, RunOutcome::Halted(0)),
157 "{label}: user process did not exit cleanly with code 0; got {outcome:?}, uart={uart:?}"
158 );
159}
160
161// Compile a hosted program and inject it as pid 1 (no FS image), then assert a
162// clean spawn-and-exit.
163fn run_example_in_kernel(user_src: &str, label: &str) {
164 let user = compile_hosted(user_src);
165 let (_, outcome, uart) = boot_kernel(cached_kernel(), Some(&user), None, "", 10_000_000);

Calls 4

compile_hostedFunction · 0.85
boot_kernelFunction · 0.85
cached_kernelFunction · 0.85
assert_user_exit_okFunction · 0.85