]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/README.testsuite
tests: introduce dummy_server_init and use it in all journald fuzzers
[thirdparty/systemd.git] / test / README.testsuite
CommitLineData
64d14b7e 1The extended testsuite only works with UID=0. It contains of several
c452e372
HH
2subdirectories named "test/TEST-??-*", which are run one by one.
3
4To run the extended testsuite do the following:
5
64d14b7e
ZJS
6$ ninja -C build # Avoid building anything as root later
7$ sudo test/run-integration-tests.sh
8ninja: Entering directory `/home/zbyszek/src/systemd/build'
9ninja: no work to do.
10--x-- Running TEST-01-BASIC --x--
11+ make -C TEST-01-BASIC BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run
12make: Entering directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC'
13TEST CLEANUP: Basic systemd setup
14TEST SETUP: Basic systemd setup
c452e372 15...
64d14b7e
ZJS
16TEST RUN: Basic systemd setup [OK]
17make: Leaving directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC'
18--x-- Result of TEST-01-BASIC: 0 --x--
19--x-- Running TEST-02-CRYPTSETUP --x--
20+ make -C TEST-02-CRYPTSETUP BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run
c452e372
HH
21
22If one of the tests fails, then $subdir/test.log contains the log file of
23the test.
24
64d14b7e 25To run just one of the cases:
c452e372 26
64d14b7e 27$ sudo make -C test/TEST-01-BASIC clean setup run
c452e372 28
64d14b7e
ZJS
29Specifying the build directory
30==============================
c6a77179 31
64d14b7e
ZJS
32If the build directory is not detected automatically, it can be specified
33with BUILD_DIR=:
c452e372 34
64d14b7e 35$ sudo BUILD_DIR=some-other-build/ test/run-integration-tests
c452e372 36
64d14b7e 37or
c452e372 38
64d14b7e 39$ sudo make -C test/TEST-01-BASIC BUILD_DIR=../../some-other-build/ ...
c6a77179 40
64d14b7e
ZJS
41Note that in the second case, the path is relative to the test case directory.
42An absolute path may also be used in both cases.
43
44Configuration variables
45=======================
46
47TEST_NO_QEMU=1 can be used to disable qemu tests.
48
49TEST_NO_NSPAWN=1 can be used to disable nspawn tests.
c6a77179 50
64d14b7e
ZJS
51KERNEL_APPEND='...' can be used to add additional kernel parameters for the QEMU runs.
52
53The kernel and initramfs can be specified with $KERNEL_BIN and $INITRD.
54(Fedora's or Debian's default kernel path and initramfs are used by default)
c6a77179
RC
55
56A script will try to find your QEMU binary. If you want to specify a different
64d14b7e
ZJS
57one with $QEMU_BIN.
58
59Debugging the qemu image
60========================
61
62If you want to log in the testsuite virtual machine, you can specify additional
63kernel command line parameter with $KERNEL_APPEND and then log in as root.
64
65$ sudo make -C test/TEST-01-BASIC KERNEL_APPEND="systemd.unit=multi-user.target" run
c6a77179 66
64d14b7e 67Root password is empty.