add interrupt tests (3h21m)
This commit is contained in:
parent
af973e8c8e
commit
2b2079d734
2 changed files with 7 additions and 0 deletions
|
@ -17,4 +17,10 @@ extern "x86-interrupt" fn breakpoint_handler(
|
|||
stack_frame: InterruptStackFrame)
|
||||
{
|
||||
println!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
|
||||
}
|
||||
|
||||
#[test_case]
|
||||
fn test_breakpoint_exception() {
|
||||
// invoke a breakpoint exception
|
||||
x86_64::instructions::interrupts::int3();
|
||||
}
|
|
@ -50,6 +50,7 @@ pub fn test_panic_handler(info: &PanicInfo) -> ! {
|
|||
#[cfg(test)]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn _start() -> ! {
|
||||
init();
|
||||
test_main();
|
||||
loop {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue