OS Testing Strategies
With tutorial-os-definitive-edition, one of the major changes I made was to add real testing to the codebase. I wanted to adhere to the no external library, framework or dependency rule.
So, what did I do? For C, it was simply building my own assert and diag style of testing. For Rust, the built in test framework with cfg test.
With both languages, I made a specific folder where I wrote test code for most parts of the source code.
At compile time, I also have a make file that uses clippy, clang and clang for analysis of the code and generates a file for that output along with my build artifacts.
This means, I have static code analysis at compile time, a dedicated test runner on the rust side whenever I want and tests that run when the OS is loading on the device.
https://github.com/RPDevJesco/tutorial-os-testing-output/tree/master
If anyone has any other testing strategies I could use, I would love to hear about it.