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)
| 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. |
| 163 | fn 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); |