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

Function kernel_fs_full_lifecycle

tests/integration/kernel_integration.rs:3213–3239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]
3234fn kernel_boots_without_fs_image() {
3235 let user = compile_hosted(
3236 r#"
3237main: () -> i32 {
3238 return 0
3239}
3240"#,
3241 );
3242 let (_, outcome, uart) = boot_kernel(cached_kernel(), Some(&user), None, "", 50_000_000);

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected