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

Function pmm_alloc_page_is_writable

tests/integration/platform_stdlib.rs:1094–1127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1092external kshutdown: (code: i64)
1093
1094kmain: () {
1095 klog_warn("memory low".ptr)
1096 klog_error("disk failed".ptr)
1097 kshutdown(1)
1098}
1099"#,
1100 );
1101 assert_eq!(uart, "[ WARN ] memory low\n[ ERR ] disk failed\n");
1102 assert_eq!(exit, Some(1));
1103}
1104
1105#[test]
1106fn kernel_boot_string_labels_no_collision() {
1107 // Kernel stdlib (compiled with __kern_str_ prefix) and user code (str_ prefix)
1108 // both emit string literals. Verifies the two rodata namespaces don't collide.
1109 let (uart, exit) = run_kernel_hll(
1110 r#"
1111external klog_ok: (msg: u8*)
1112external klog_int: (label: u8*, val: i64)
1113external kshutdown: (code: i64)
1114
1115kmain: () {
1116 klog_ok("user string A".ptr)
1117 klog_int("user string B".ptr, 99)
1118 kshutdown(0)
1119}
1120"#,
1121 );
1122 assert_eq!(uart, "[ OK ] user string A\nuser string B: 99\n");
1123 assert_eq!(exit, Some(0));
1124}
1125
1126const MY_KERNEL_EXAMPLE: &str = os_runtime::kernel::MY_KERNEL;
1127
1128#[test]
1129fn my_kernel_example_program() {
1130 let (uart, exit) = run_kernel_hll(MY_KERNEL_EXAMPLE);

Callers

nothing calls this directly

Calls 1

run_kernel_hllFunction · 0.70

Tested by

no test coverage detected