Skip to content

Commit 6cedbf7

Browse files
committed
Fixed tests, using cargo test
The various changes over the last year or so broke testing with cargo xtest, but we can now use cargo test instead. Note that we had to remove the (admittedly redundant) declarations of `panic = "abort"` in both `dev` and `release` profiles in Cargo.toml, thanks to rust-lang/cargo#7359. The only thing left is the repeated deprecation warning from bootloader, tracked in rust-osdev/bootloader#107, which needs to be reopend at time of writing. Signed-off-by: SlyMarbo <[email protected]>
1 parent a326c55 commit 6cedbf7

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

kernel/Cargo.toml

+1-9
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,11 @@ uart_16550 = "=0.2.15"
1414
volatile = "=0.2.6"
1515
x86_64 = "=0.14.6"
1616

17-
[profile.dev]
18-
panic = "abort"
19-
20-
[profile.release]
21-
panic = "abort"
22-
2317
[package.metadata.bootimage]
2418
test-success-exit-code = 33 # (0x10 << 1) | 1
2519
test-timeout = 300 # (in seconds)
2620
test-args = [
27-
"-device", "isa-debug-exit,iobase=0xf4,iosize=0x04",
28-
"-serial", "stdio",
29-
"-display", "none"
21+
"-device", "isa-debug-exit,iobase=0xf4,iosize=0x04"
3022
]
3123
run-command = [
3224
"qemu-system-x86_64",

kernel/test

-5
This file was deleted.

kernel/tests/stack_overflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use x86_64::structures::idt::InterruptDescriptorTable;
99
use x86_64::structures::idt::InterruptStackFrame;
1010

1111
extern "x86-interrupt" fn test_double_fault_handler(
12-
_stack_frame: &mut InterruptStackFrame,
12+
_stack_frame: InterruptStackFrame,
1313
_error_code: u64,
1414
) -> ! {
1515
println!("[ok]");

0 commit comments

Comments
 (0)