This repository was archived by the owner on Apr 6, 2020. It is now read-only.
This repository was archived by the owner on Apr 6, 2020. It is now read-only.
Unit testing; what to do about protected components? #68
Open
Description
I was just messing around a bit, trying to add a cursor back into the new VGA code on my fork, no issues running the code in QEMU, but definitely had issues trying to access VGA hardware registers in test code. I basically broke all VGA tests by causing SIGSEGVs (woo!).
Wondering what the options are for unit testing code that needs to work so close to metal...
In school we wrote components for PintOS, but all the testing was done by running executables in user space. This worked quite well, but its really system testing, not unit testing. Without writing the kernel code to be accommodating of unit testing (lots of traits? Passing around real & mock impls), I'm not seeing how to assert on some aspects of the kernel directly.