add a wrapper to dmtest-python
install it:
# git clone https://github.com/jthornber/dmtest-python.git
# cd dmtest-python
# pip install -r requirements.txt
edit config.toml. See config.toml.example for an example. Setting
"disable_by_id_check" lets you use any valid device path. Otherwise, you
will need to use device paths starting with "/dev/mapper/" or
"/dev/disk/by-id/"
run:
# ./dmtest health
to see any missing dependencies. You can also look in
test_dependencies.toml
Install the non-packaged dependencies:
To install dt:
# git clone https://github.com/RobinTMiller/dt.git
# cp dt/linux-rhel7x64/dt /usr/bin/
Some tests need a linux git repository to use for snapshotting. To run
these tests, you need to clone it to the root directory of the dmtest
repo. Either that or you can set the DMTEST_KERNEL_SOURCE environment
variable to point to a kernel repo on the system.
The bufio tests need the bufio-test module, which is not part of the
kernel source. To build and install the bufio-test module:
# git clone https://github.com/bmarzins/bufio-test.git
Check out the appropriate branch (rhel8, rhel9, or main for upstream).
Install the kernel-devel package for the kernel you're testing.
# cd bufio-test
# make -C /lib/modules/`uname -r`/build M=$PWD
# make -C /lib/modules/`uname -r`/build M=$PWD modules_install
We don't currently package blk-archive, but to test it (and with it,
thin devices and snapshots) you can install it with
# git clone https://github.com/jthornber/blk-archive
# dnf install -y cargo systemd-devel device-mapper-devel
# cargo build --release
# cargo install --path .
Add ~/.cargo/bin to your PATH environment variable
Run dmtest:
# ./dmtest run --result-set <name>
This will run all the tests, and save the results in under <name> in
the results database test_results.db
# ./dmtest list --result-set <name>
This will display the results of the lastest test runs from the result
set <name>
# ./dmtest log --with-dmesg --result-set <name>
This will display the logs, including the dmesg output of the lastest
runs from the result set <name>
You can avoid having to add the --result-set option by setting the
DMTEST_RESULT_SET to the result set name you want.
# ./dmtest --help
and
# ./dmtest <cmd> --help