Skip to content

Commit 9efe87f

Browse files
committed
Print panic message when basic_boot test panics
1 parent 867672b commit 9efe87f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_kernels/default_settings/src/bin/basic_boot.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ fn kernel_main(_boot_info: &'static mut BootInfo) -> ! {
1313

1414
/// This function is called on panic.
1515
#[panic_handler]
16-
fn panic(_info: &PanicInfo) -> ! {
16+
fn panic(info: &PanicInfo) -> ! {
17+
use core::fmt::Write;
18+
19+
let _ = writeln!(test_kernel_default_settings::serial(), "PANIC: {}", info);
1720
exit_qemu(QemuExitCode::Failed);
1821
}

0 commit comments

Comments
 (0)