SW: Usermode Linux for testing Greybus code
Created by: jadonk
What I'm trying to accomplish
- Enable crashes in greybus/gbridge code to not crash the system
- Validate code
- Create automated test benches that can run in CI
- Run test code in a container to normalize the build environment
- Create releases as an executable, such that we might be able to make applications
Note that User Mode Linux (UML) doesn't accomplish something I'd really like, which is the ability to make iPhone apps that could interact directly with BeagleConnect sensors. Android, however, might be possible, depending on the kernel dependencies and overall it allows better isolation.
The UML performance is also of concern, but our sensor interface example is more about code maintenance simplification and should not need very much performance which is likely to be network bound anyway.
What I researched
- https://www.kernel.org/doc/html/latest/virt/uml/user_mode_linux_howto_v2.html
- http://user-mode-linux.sourceforge.net/
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/um
- https://en.wikipedia.org/wiki/User-mode_Linux
From what people say, it only works on x86, but I've seen builds of uml-utilities
on Debian/Ubuntu for ARM, so it seems there's some starting elements on the host-side kernel. The package user-mode-linux
doesn't seem to be in any distros. It is unclear to me how much needs to be enabled in the host kernel.
What I tried
Not much yet
What happened
Nothing yet
What I expect to happen
I need to put more here, but essentially run a Docker container with a Linux kernel and all the sensor drivers in it that "just works" and can be tested with network-based sensor simulations or the real deal.