Rapido is a utility for quick testing of Linux kernel changes.
The scripts that make up Rapido are in themselves quite brainless. Most of the heavy lifting is instead performed by:
Rapido has a pretty minimal set of dependencies, which should be present on all major Linux distributions.
-
Dracut
-
QEMU
-
iproute2 with 'ip tuntap' support
Once all dependencies have been installed, Rapido can be configured via rapido.conf (see rapido.conf.example). At a minimum, the Linux kernel source parameters should be defined.
Test VM images may be "cut" with or without network support. For networking, the bridge, tap and MAC address parameters must be specified in rapido.conf. The 'rapido setup-network' command should be run as root to configure the bridge network device. By default, the bridge network is isolated, and isn’t connected to any physical adapters.
Depending on which kernel component or functionality you’d like to test, choose a 'cut' script to generate a VM image, which pulls all relevant kernel modules from the rapido.conf KERNEL_SRC directory. The VM initramfs image will be written to 'initrds/myinitrd'.
The cut scripts can be executed by running the appropriate 'rapido cut' command, like 'rapido cut fstests-btrfs'.
Once generated, the VM image and kernel can be booted by running 'rapido boot'.
Rapido can be easily extended to test any kernel functionality of interest. To do so, make a copy of the 'cut/simple_example.sh' and 'autorun/simple_example.sh' scripts, and modify them to suit your needs. The example scripts are fully annotated.
Please raise any questions or issues upstream via https://github.com/rapido-linux/rapido/issues
+------------------------+ | | | Rapido "cut" script | | | | +--------------------+ | +-----+ | | | | | | | | File manifest: | | | | +------------------------+ | | + Kernel modules | | | | | | | | + User-space files | | | | | Userspace dependencies | | | | | | | | E.g. | | +---------+----------+ | | | | - xfstests, blktests | | | <----+ | | - Ceph conf + binaries | | +---------v----------+ | | | | - Samba +--->--+----> | | | | | - etc. | | | | Dracut initramfs | | | R | | | | | | generator | | | a | +------------------------+ ^ | | | | | p | | | +---------+----------+ | | i | +-------------------------+ | | | | | d | | | | +------------------------+ | o | | Rapido "autorun" script +-->--+ | | . | | | | +---------v----------+ | c | +-------------------------+ | | | | o | | | Initramfs | | n | ^ | + Includes all | | f | +------------------------+ | | kernel / user | | | | Compiled Linux Kernel | | | dependencies | | | | | | | | | | | +---------+ | | +---------+----------+ | | | | Modules +---------------->--+ | | | | +---------+ | +------------------------+ | | | | | | | | | | +---------+ | | Rapido "vm" script | | | | | bzImage +---------------->--+ | | | | | | +---------+ | | | +--------v----+ | | | | | | | | | <----+ | +------------------------+ +-----> QEMU / KVM | | | | | | | | | | | +--------+----+ | | | | | | +--+--+ +------------------------+ | ___________________ | | | Virtual network |o-------+ +-----------v--------------+ v =========^========= | | | | | | | Virtual Machine | | | +---o| + Console redirected | | | | to stdout / from stdin <-----+ +-----------+--------------+ | + autorun script | | | | | executed on boot | | | Rapido "br_setup" script | | | v | | +--------------------------+ | +-----------^--------------+ | | | +------------------------------<------------------------+