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

Function os_inspector_sees_shell_as_pid1

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

Source from the content-addressed store, hash-verified

3394 .find(|c| c.name == "home")
3395 .expect("/home should be in the tree");
3396 assert!(home.is_dir, "/home should be a directory");
3397
3398 let readme = root
3399 .children
3400 .iter()
3401 .find(|c| c.name == "readme.txt")
3402 .expect("/readme.txt should be in the tree");
3403 assert!(!readme.is_dir, "/readme.txt should be a file");
3404 assert_eq!(
3405 readme.size as usize,
3406 body.len(),
3407 "file size should match the written bytes"
3408 );
3409
3410 let preview = fs_view::file_preview(&vm, &sym, readme);
3411 assert_eq!(preview, body, "preview should round-trip the file contents");
3412}
3413
3414// --- FS layout / symbol checks (no VM needed) ---
3415
3416#[test]
3417fn kernel_fs_user_globals_in_mapped_range() {
3418 let assembled = compile_hosted(FS_EXERCISER);
3419 let flat = assembled.to_flat_binary();
3420 let padded = (flat.len().div_ceil(4096) * 4096) as u64;
3421
3422 for sym in &["_a0", "_a1", "_a2", "_a3", "_ret"] {
3423 let off = assembled
3424 .symbol_address(sym)
3425 .unwrap_or_else(|| panic!("symbol '{sym}' missing from user binary"));
3426 assert!(
3427 off + 8 <= padded,

Callers

nothing calls this directly

Calls 7

cached_kernelFunction · 0.85
compile_hosted_programFunction · 0.85
build_fs_imageFunction · 0.85
setup_kernel_vmFunction · 0.85
collectMethod · 0.80
captureFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected