Merge pull request #23264 from keszybz/shorten-test-names

Shorten test names
This commit is contained in:
Yu Watanabe
2022-05-04 23:25:47 +09:00
committed by GitHub
90 changed files with 50 additions and 36 deletions

View File

@@ -73,7 +73,7 @@ D-Bus messages in `src/shared/bus-unit-util.c`
So that they are exercised by the fuzzing CI, new unit settings should also be listed in the
text files under `test/fuzz/fuzz-unit-file/`.
## UDEV
## systemd-udev
Sources for the udev daemon and command-line tool (single binary) can be found under
`src/udev/`.
@@ -83,7 +83,7 @@ Sources for the udev daemon and command-line tool (single binary) can be found u
Source files found under `src/test/` implement unit-level testing, mostly for
modules found in `src/basic/` and `src/shared/`, but not exclusively. Each test
file is compiled in a standalone binary that can be run to exercise the
corresponding module. While most of the tests can be ran by any user, some
corresponding module. While most of the tests can be run by any user, some
require privileges, and will attempt to clearly log about what they need
(mostly in the form of effective capabilities). These tests are self-contained,
and generally safe to run on the host without side effects.
@@ -91,22 +91,34 @@ and generally safe to run on the host without side effects.
Ideally, every module in `src/basic/` and `src/shared/` should have a
corresponding unit test under `src/test/`, exercising every helper function.
## Fuzzer test cases
Files under `test/fuzz/` contain input data for fuzzers, one subdirectory for
each fuzzer. Some of the files are "seed corpora", i.e. files that contain
lists of settings and input values intended to generate initial coverage, and
other files are samples saved by the fuzzing engines when they find an issue.
When adding new input samples under `test/fuzz/*/`, please use some
short-but-meaningful names. Names of meson tests include the input file name
and output looks awkward if they are too long.
# Integration Tests
Sources in `test/` implement system-level testing for executables, libraries and
daemons that are shipped by the project. They require privileges to run, and
are not safe to execute directly on a host. By default they will build an image
and run the test under it via `QEMU` or `systemd-nspawn`.
Sources in `test/TEST-*` implement system-level testing for executables,
libraries and daemons that are shipped by the project. They require privileges
to run, and are not safe to execute directly on a host. By default they will
build an image and run the test under it via `qemu` or `systemd-nspawn`.
Most of those tests should be able to run via `systemd-nspawn`, which is orders of
magnitude faster than `QEMU`, but some tests require privileged operations like
using `dm-crypt` or `loopdev`. They are clearly marked if that is the case.
Most of those tests should be able to run via `systemd-nspawn`, which is
orders-of-magnitude faster than `qemu`, but some tests require privileged
operations like using `dm-crypt` or `loopdev`. They are clearly marked if that
is the case.
See `test/README.testsuite` for more specific details.
# HWDB
# hwdb
Rules built in the static `HWDB` database shipped by the project can be found
Rules built in the static hardware database shipped by the project can be found
under `hwdb.d/`. Some of these files are updated automatically, some are filled
by contributors.
@@ -119,7 +131,7 @@ Markdown files found under `docs/` are automatically published on the
to ensure the formatting doesn't have errors is included in the
`meson test -C build/ github-pages` run as part of the CI.
## MAN pages
## Man pages
Manpages for binaries and libraries, and the DBUS interfaces, can be found under
`man/` and should ideally be kept in sync with changes to the corresponding

View File

@@ -1,5 +1,7 @@
The extended testsuite only works with UID=0. It contains of several
subdirectories named "test/TEST-??-*", which are run one by one.
The extended testsuite only works with UID=0. It consists of the subdirectories
named "test/TEST-??-*", each of which contains a description of an OS image and
a test which consists of systemd units and scripts to execute in this image.
The same image is used for execution under `systemd-nspawn` and `qemu`.
To run the extended testsuite do the following:
@@ -53,10 +55,10 @@ Configuration variables
=======================
TEST_NO_QEMU=1
Don't run tests under QEMU
Don't run tests under qemu
TEST_QEMU_ONLY=1
Run only tests that require QEMU
Run only tests that require qemu
TEST_NO_NSPAWN=1
Don't run tests under systemd-nspawn
@@ -65,8 +67,8 @@ TEST_PREFER_NSPAWN=1
Run all tests that do not require qemu under systemd-nspawn
TEST_NO_KVM=1
Disable QEMU KVM auto-detection (may be necessary when you're trying to run the
*vanilla* QEMU and have both qemu and qemu-kvm installed)
Disable qemu KVM auto-detection (may be necessary when you're trying to run the
*vanilla* qemu and have both qemu and qemu-kvm installed)
TEST_NESTED_KVM=1
Allow tests to run with nested KVM. By default, the testsuite disables
@@ -74,10 +76,10 @@ TEST_NESTED_KVM=1
variable disables such checks
QEMU_MEM=512M
Configure amount of memory for QEMU VMs (defaults to 512M)
Configure amount of memory for qemu VMs (defaults to 512M)
QEMU_SMP=1
Configure number of CPUs for QEMU VMs (defaults to 1)
Configure number of CPUs for qemu VMs (defaults to 1)
KERNEL_APPEND='...'
Append additional parameters to the kernel command line
@@ -86,7 +88,7 @@ NSPAWN_ARGUMENTS='...'
Specify additional arguments for systemd-nspawn
QEMU_TIMEOUT=infinity
Set a timeout for tests under QEMU (defaults to infinity)
Set a timeout for tests under qemu (defaults to infinity)
NSPAWN_TIMEOUT=infinity
Set a timeout for tests under systemd-nspawn (defaults to infinity)
@@ -99,7 +101,7 @@ INTERACTIVE_DEBUG=1
The kernel and initramfs can be specified with $KERNEL_BIN and $INITRD.
(Fedora's or Debian's default kernel path and initramfs are used by default)
A script will try to find your QEMU binary. If you want to specify a different
A script will try to find your qemu binary. If you want to specify a different
one with $QEMU_BIN.
Debugging the qemu image

View File

@@ -101,7 +101,7 @@ test_run_one() {
local test_id="${1:?}"
if run_qemu "$test_id"; then
check_result_qemu || { echo "QEMU test failed"; return 1; }
check_result_qemu || { echo "qemu test failed"; return 1; }
fi
return 0
@@ -117,7 +117,7 @@ test_run() {
mount_initdir
if get_bool "${TEST_NO_QEMU:=}" || ! find_qemu_bin; then
dwarn "can't run QEMU, skipping"
dwarn "can't run qemu, skipping"
return 0
fi

Some files were not shown because too many files have changed in this diff Show More