Skip to content

Commit 561eaf9

Browse files
committed
Print panic message when verify_higher_half test panics
1 parent 2394b4f commit 561eaf9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_kernels/higher_half/src/bin/verify_higher_half.rs

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

1818
/// This function is called on panic.
1919
#[panic_handler]
20-
fn panic(_info: &PanicInfo) -> ! {
20+
fn panic(info: &PanicInfo) -> ! {
21+
use core::fmt::Write;
22+
23+
let _ = writeln!(test_kernel_higher_half::serial(), "PANIC: {}", info);
2124
exit_qemu(QemuExitCode::Failed);
2225
}

0 commit comments

Comments
 (0)