diff options
author | Dennis Kobert <dennis@kobert.dev> | 2019-11-11 18:42:59 +0100 |
---|---|---|
committer | Dennis Kobert <dennis@kobert.dev> | 2019-11-11 18:42:59 +0100 |
commit | ec22f3464c87b3d1b1688898053a569bc4839404 (patch) | |
tree | 7332136eb3c3cb08dea32cbd89ee3254b55466bb /kernel/tests/stack_overflow.rs | |
parent | 26a7561196674b39f9adadcb374f36c503361adb (diff) |
Add expect fault handling
Diffstat (limited to 'kernel/tests/stack_overflow.rs')
-rw-r--r-- | kernel/tests/stack_overflow.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/tests/stack_overflow.rs b/kernel/tests/stack_overflow.rs index 677a9e1..dc53537 100644 --- a/kernel/tests/stack_overflow.rs +++ b/kernel/tests/stack_overflow.rs @@ -1,25 +1,28 @@ #![no_main] #![feature(compiler_builtins_lib)] -#![feature(custom_test_frameworks)] #![feature(abi_x86_interrupt)] #![feature(panic_info_message)] -#![test_runner(kernel::testing::serial_test_runner_panic)] #![no_std] use core::fmt::Write; use kernel; +use kernel::interrupts; +use kernel::interrupts::exceptions; use kernel::io::qemu; #[no_mangle] extern "C" fn _start() -> ! { kernel::init(); + unsafe { + exceptions::expect_fault(interrupts::Interrupts::PAGE_FAULT); + } _loop(0); - + panic!("PAGE_FAULT not caught"); loop {} } fn _loop(i: u128) -> u128 { - if i > 1u128 << 83 { + if i > 1u128 << 120 { return i; } let n = i; |