added tests + exiting by interacting with qemu through a I/O port

This commit is contained in:
clizia 2025-08-27 23:53:59 +02:00
parent 745b574bd6
commit c3f181a641
3 changed files with 48 additions and 1 deletions

View file

@ -5,7 +5,7 @@ edition = "2024"
[[bin]]
name = "totos"
test = false
test = true
bench = false
[profile.dev]
@ -18,7 +18,13 @@ panic = "abort" # disable stack unwinding on panic
bootloader = "0.9"
volatile = "0.2.6"
spin = "0.5.2"
x86_64 = "0.14.2"
[dependencies.lazy_static]
version = "1.0"
features = ["spin_no_std"]
# this enables exiting qemu from the guest system
[package.metadata.bootimage]
test-args = ["-device", "isa-debug-exit,iobase=0xf4,iosize=0x04"]
test-success-exit-code = 33 # (0x10 << 1) | 1 = 33