(
kernel: &AssembledOutput,
user: Option<&AssembledOutput>,
fs_image: Option<&[u8]>,
input: &str,
max_steps: u64,
)
| 121 | } |
| 122 | |
| 123 | // A hosted user program injected as pid 1 must spawn and exit with code 0. |
| 124 | fn assert_user_exit_ok(uart: &str, outcome: &StepOutcome, label: &str) { |
| 125 | assert!( |
| 126 | !uart.contains("PANIC!"), |
| 127 | "{label}: kernel panicked; uart={uart:?}" |
| 128 | ); |
| 129 | assert!( |
| 130 | !uart.contains("unhandled exception"), |
| 131 | "{label}: unhandled CPU exception; uart={uart:?}" |
| 132 | ); |
| 133 | assert!( |
| 134 | uart.contains("[ PROC ] pid 1 ready"), |
| 135 | "{label}: user process was not spawned; uart={uart:?}" |
| 136 | ); |