nuta / kerla

A new operating system kernel with Linux binary compatibility written in Rust.
Other
3.35k stars 87 forks source link

C integration test design #166

Open anholt opened 1 month ago

anholt commented 1 month ago

I'm working on ELF binfmt support a bit, and I'd like to be able to write integration tests in C. How would we like to integrate non-shell integration tests? One thought would be to build them from testing/Dockerfile, so that we have a reproducible build without demanding that the user install a bunch of arbitrary tools just to build kerla. The downside to that plan is that then verifying that the integration test actually passes on Linux means docker runing instead of just invoking the binary, and that docker container won't have all the tools you're used to (gdb, eu-readelf, etc.).

Thoughts?

anholt commented 1 month ago

Motivation: ET_DYN WIP is at https://github.com/anholt/kerla/tree/et-dyn, commit log shows the current sticking point.

nuta commented 1 month ago

Putting binary-based tests in the Dockerfile sounds good. Running them on Linux is still simple, and I think we can still debug it with docker debug.