File: TESTING

package info (click to toggle)
lvm2 2.03.11-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 14,096 kB
  • sloc: ansic: 167,186; sh: 31,637; python: 5,638; makefile: 1,962; ruby: 66; awk: 20; cpp: 10
file content (62 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
LVM2 Test Suite
===============

The codebase contains many tests in the test subdirectory.

Before running tests
--------------------

Keep in mind the testsuite MUST run under root user.

It is recommended not to use LVM on the test machine, especially when running
tests with udev (`make check_system`.)

You MUST disable (or mask) any LVM daemons:

- lvmetad
- dmeventd
- lvmpolld
- lvmdbusd
- lvmlockd
- clvmd
- cmirrord

For running cluster tests, we are using singlenode locking. Pass
`--with-clvmd=singlenode` to configure.

NOTE: This is useful only for testing, and should not be used in produciton
code.

To run D-Bus daemon tests, existing D-Bus session is required.

Running tests
-------------

As root run:

    make check

To run only tests matching a string:

    make check T=test

To skip tests matching a string:

    make check S=test

There are other targets and many environment variables can be used to tweak the
testsuite - for full list and description run `make -C test help`.

Installing testsuite
--------------------

It is possible to install and run a testsuite against installed LVM. Run the
following:

    make -C test install

Then lvm2-testsuite binary can be executed to test installed binaries.

See `lvm2-testsuite --help` for options. The same environment variables can be
used as with `make check`.