()
| 3211 | assert!(!uart.contains("PANIC!"), "kernel panicked; uart={uart:?}"); |
| 3212 | assert!( |
| 3213 | matches!(outcome, StepOutcome::Halted(0)), |
| 3214 | "exit did not halt cleanly; outcome={outcome:?} uart={uart:?}" |
| 3215 | ); |
| 3216 | // rmdir /full must fail (non-empty); rmdir /empty must succeed. |
| 3217 | assert!( |
| 3218 | uart.contains("rmdir: cannot remove: /full"), |
| 3219 | "rmdir should refuse a non-empty directory; uart={uart:?}" |
| 3220 | ); |
| 3221 | |
| 3222 | let final_image = vm.peek_bytes_raw(FS_IMAGE_PA, image.len()); |
| 3223 | assert!( |
| 3224 | inode_present(&final_image, "full", 2), |
| 3225 | "non-empty dir was wrongly removed" |
| 3226 | ); |
| 3227 | assert!( |
| 3228 | !inode_present(&final_image, "empty", 2), |
| 3229 | "empty dir was not removed" |
| 3230 | ); |
| 3231 | } |
| 3232 | |
| 3233 | #[test] |
| 3234 | fn kernel_boots_without_fs_image() { |
| 3235 | let user = compile_hosted( |
| 3236 | r#" |
| 3237 | main: () -> i32 { |
| 3238 | return 0 |
| 3239 | } |
| 3240 | "#, |
| 3241 | ); |
| 3242 | let (_, outcome, uart) = boot_kernel(cached_kernel(), Some(&user), None, "", 50_000_000); |
nothing calls this directly
no test coverage detected