Skip to content

Commit

Permalink
Fixed tests, using cargo test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SlyMarbo committed Nov 8, 2021
1 parent d6fdea0 commit a4ca6b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@ uart_16550 = "=0.2.15"
volatile = "=0.2.6"
x86_64 = "=0.14.6"

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"

[package.metadata.bootimage]
test-success-exit-code = 33 # (0x10 << 1) | 1
test-timeout = 300 # (in seconds)
test-args = [
"-device", "isa-debug-exit,iobase=0xf4,iosize=0x04",
"-serial", "stdio",
"-display", "none"
"-device", "isa-debug-exit,iobase=0xf4,iosize=0x04"
]
run-command = [
"qemu-system-x86_64",
Expand Down
2 changes: 1 addition & 1 deletion kernel/tests/stack_overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use x86_64::structures::idt::InterruptDescriptorTable;
use x86_64::structures::idt::InterruptStackFrame;

extern "x86-interrupt" fn test_double_fault_handler(
_stack_frame: &mut InterruptStackFrame,
_stack_frame: InterruptStackFrame,
_error_code: u64,
) -> ! {
println!("[ok]");
Expand Down

0 comments on commit a4ca6b5

Please sign in to comment.