Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
cut
 
 
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.adoc

Rapido

Overview

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:

Dracut

Generates a VM image, with kernel-modules and minimal user-space.

QEMU

Boots a given Dracut VM image and compiled Linux kernel on the local system.

Setup

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.

Network Configuration

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.

Running

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'.

Adding Your Own Tests

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.

Feedback and Bug Reporting

Please raise any questions or issues upstream via https://github.com/rapido-linux/rapido/issues

Architecture

                                   +------------------------+
                                   |                        |
                                   | 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
|                          |       +--------------------------+     |
+-----------^--------------+                                        |
            |                                                       |
            +------------------------------<------------------------+

About

A utility for rapid testing of Linux kernel changes

Resources

License

Languages

You can’t perform that action at this time.