diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 3b81d8f737..384e3d4288 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -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 diff --git a/test/README.testsuite b/test/README.testsuite index 24b98f78cd..7e3d6c0623 100644 --- a/test/README.testsuite +++ b/test/README.testsuite @@ -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 diff --git a/test/TEST-64-UDEV-STORAGE/test.sh b/test/TEST-64-UDEV-STORAGE/test.sh index d2660d3951..e273d211bc 100755 --- a/test/TEST-64-UDEV-STORAGE/test.sh +++ b/test/TEST-64-UDEV-STORAGE/test.sh @@ -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 diff --git a/test/fuzz/fuzz-bus-message/crash-4f0211eb269e28db941961061494bfdbf3345e54 b/test/fuzz/fuzz-bus-message/crash-array similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-4f0211eb269e28db941961061494bfdbf3345e54 rename to test/fuzz/fuzz-bus-message/crash-array diff --git a/test/fuzz/fuzz-bus-message/crash-37449529b1ad867f0c2671fa80aca5d7812a2b70 b/test/fuzz/fuzz-bus-message/crash-array-field-skip similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-37449529b1ad867f0c2671fa80aca5d7812a2b70 rename to test/fuzz/fuzz-bus-message/crash-array-field-skip diff --git a/test/fuzz/fuzz-bus-message/crash-d8f3941c74219b4c03532c9b244d5ea539c61af5 b/test/fuzz/fuzz-bus-message/crash-array-offset similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-d8f3941c74219b4c03532c9b244d5ea539c61af5 rename to test/fuzz/fuzz-bus-message/crash-array-offset diff --git a/test/fuzz/fuzz-bus-message/crash-29ed3c202e0ffade3cad42c8bbeb6cc68a21eb8e b/test/fuzz/fuzz-bus-message/crash-empty-string similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-29ed3c202e0ffade3cad42c8bbeb6cc68a21eb8e rename to test/fuzz/fuzz-bus-message/crash-empty-string diff --git a/test/fuzz/fuzz-bus-message/crash-26bba7182dedc8848939931d9fcefcb7922f2e56 b/test/fuzz/fuzz-bus-message/crash-empty-struct similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-26bba7182dedc8848939931d9fcefcb7922f2e56 rename to test/fuzz/fuzz-bus-message/crash-empty-struct diff --git a/test/fuzz/fuzz-bus-message/crash-b88ad9ecf4aacf4a0caca5b5543953265367f084 b/test/fuzz/fuzz-bus-message/crash-mem-overread similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-b88ad9ecf4aacf4a0caca5b5543953265367f084 rename to test/fuzz/fuzz-bus-message/crash-mem-overread diff --git a/test/fuzz/fuzz-bus-message/crash-32bf69483cbd4f2e6d46c25a2f92a472109aee45 b/test/fuzz/fuzz-bus-message/crash-nesting similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-32bf69483cbd4f2e6d46c25a2f92a472109aee45 rename to test/fuzz/fuzz-bus-message/crash-nesting diff --git a/test/fuzz/fuzz-bus-message/crash-e1b811da5ca494e494b77c6bd8e1c2f2989425c5 b/test/fuzz/fuzz-bus-message/crash-offset-table similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-e1b811da5ca494e494b77c6bd8e1c2f2989425c5 rename to test/fuzz/fuzz-bus-message/crash-offset-table diff --git a/test/fuzz/fuzz-bus-message/crash-4162a61a79e4c5a832ca5232212f75fa560a1f75 b/test/fuzz/fuzz-bus-message/crash-return-value similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-4162a61a79e4c5a832ca5232212f75fa560a1f75 rename to test/fuzz/fuzz-bus-message/crash-return-value diff --git a/test/fuzz/fuzz-bus-message/crash-c1b37b4729b42c0c05b23cba4eed5d8102498a1e b/test/fuzz/fuzz-bus-message/crash-return-value-again similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-c1b37b4729b42c0c05b23cba4eed5d8102498a1e rename to test/fuzz/fuzz-bus-message/crash-return-value-again diff --git a/test/fuzz/fuzz-bus-message/crash-603dfd98252375ac7dbced53c2ec312671939a36 b/test/fuzz/fuzz-bus-message/crash-unsigned-wraparound similarity index 100% rename from test/fuzz/fuzz-bus-message/crash-603dfd98252375ac7dbced53c2ec312671939a36 rename to test/fuzz/fuzz-bus-message/crash-unsigned-wraparound diff --git a/test/fuzz/fuzz-bus-message/leak-c09c0e2256d43bc5e2d02748c8d8760e7bc25d20 b/test/fuzz/fuzz-bus-message/leak-container-exit similarity index 100% rename from test/fuzz/fuzz-bus-message/leak-c09c0e2256d43bc5e2d02748c8d8760e7bc25d20 rename to test/fuzz/fuzz-bus-message/leak-container-exit diff --git a/test/fuzz/fuzz-bus-message/timeout-08ee8f6446a4064db064e8e0b3d220147f7d0b5b b/test/fuzz/fuzz-bus-message/timeout-empty-struct similarity index 100% rename from test/fuzz/fuzz-bus-message/timeout-08ee8f6446a4064db064e8e0b3d220147f7d0b5b rename to test/fuzz/fuzz-bus-message/timeout-empty-struct diff --git a/test/fuzz/fuzz-dhcp-client/timeout-ed34161922c7075c4773f2ada3dee8685d220980 b/test/fuzz/fuzz-dhcp-client/timeout-lease_parse_routes similarity index 100% rename from test/fuzz/fuzz-dhcp-client/timeout-ed34161922c7075c4773f2ada3dee8685d220980 rename to test/fuzz/fuzz-dhcp-client/timeout-lease_parse_routes diff --git a/test/fuzz/fuzz-dhcp6-client/crash-6e88fcb6b85c9436bcbe05219aa8e550194645ef b/test/fuzz/fuzz-dhcp6-client/crash-buf-size similarity index 100% rename from test/fuzz/fuzz-dhcp6-client/crash-6e88fcb6b85c9436bcbe05219aa8e550194645ef rename to test/fuzz/fuzz-dhcp6-client/crash-buf-size diff --git a/test/fuzz/fuzz-dhcp6-client/crash-4003c06fce43a11fbd22f02584df2807ac333eae b/test/fuzz/fuzz-dhcp6-client/crash-domainname similarity index 100% rename from test/fuzz/fuzz-dhcp6-client/crash-4003c06fce43a11fbd22f02584df2807ac333eae rename to test/fuzz/fuzz-dhcp6-client/crash-domainname diff --git a/test/fuzz/fuzz-dhcp6-client/f202c4dff34d15e41c032a66ed25d89154be1f6d b/test/fuzz/fuzz-dhcp6-client/crash-initial1 similarity index 100% rename from test/fuzz/fuzz-dhcp6-client/f202c4dff34d15e41c032a66ed25d89154be1f6d rename to test/fuzz/fuzz-dhcp6-client/crash-initial1 diff --git a/test/fuzz/fuzz-dhcp6-client/12ad30d317800d7f731c1c8bc0854e531d5ef928 b/test/fuzz/fuzz-dhcp6-client/crash-initial2 similarity index 100% rename from test/fuzz/fuzz-dhcp6-client/12ad30d317800d7f731c1c8bc0854e531d5ef928 rename to test/fuzz/fuzz-dhcp6-client/crash-initial2 diff --git a/test/fuzz/fuzz-dhcp6-client/crash-a93b8ba024ada36014c29c25cc90c668fd91ce7f b/test/fuzz/fuzz-dhcp6-client/crash-initial3 similarity index 100% rename from test/fuzz/fuzz-dhcp6-client/crash-a93b8ba024ada36014c29c25cc90c668fd91ce7f rename to test/fuzz/fuzz-dhcp6-client/crash-initial3 diff --git a/test/fuzz/fuzz-journal-remote/crash-96dee870ea66d03e89ac321eee28ea63a9b9aa45 b/test/fuzz/fuzz-journal-remote/crash-nul-in-field-name similarity index 100% rename from test/fuzz/fuzz-journal-remote/crash-96dee870ea66d03e89ac321eee28ea63a9b9aa45 rename to test/fuzz/fuzz-journal-remote/crash-nul-in-field-name diff --git a/test/fuzz/fuzz-journal-remote/crash-5a8f03d4c3a46fcded39527084f437e8e4b54b76 b/test/fuzz/fuzz-journal-remote/crash-source-realtime-ts similarity index 100% rename from test/fuzz/fuzz-journal-remote/crash-5a8f03d4c3a46fcded39527084f437e8e4b54b76 rename to test/fuzz/fuzz-journal-remote/crash-source-realtime-ts diff --git a/test/fuzz/fuzz-journald-kmsg/crash-c6c04d83e73f3d1417bc0afce8fa81b99f955963 b/test/fuzz/fuzz-journald-kmsg/crash-ident-with-spaces similarity index 100% rename from test/fuzz/fuzz-journald-kmsg/crash-c6c04d83e73f3d1417bc0afce8fa81b99f955963 rename to test/fuzz/fuzz-journald-kmsg/crash-ident-with-spaces diff --git a/test/fuzz/fuzz-journald-kmsg/leak-ab161e601e82f1ec31d11e2cbae2747834ce9e43 b/test/fuzz/fuzz-journald-kmsg/leak-missing-cleanup similarity index 100% rename from test/fuzz/fuzz-journald-kmsg/leak-ab161e601e82f1ec31d11e2cbae2747834ce9e43 rename to test/fuzz/fuzz-journald-kmsg/leak-missing-cleanup diff --git a/test/fuzz/fuzz-netdev-parser/clusterfuzz-testcase-minimized-fuzz-netdev-parser-4697395387039744 b/test/fuzz/fuzz-netdev-parser/crash-null-address similarity index 100% rename from test/fuzz/fuzz-netdev-parser/clusterfuzz-testcase-minimized-fuzz-netdev-parser-4697395387039744 rename to test/fuzz/fuzz-netdev-parser/crash-null-address diff --git a/test/fuzz/fuzz-network-parser/21-vlan.network b/test/fuzz/fuzz-network-parser/21-vlan similarity index 100% rename from test/fuzz/fuzz-network-parser/21-vlan.network rename to test/fuzz/fuzz-network-parser/21-vlan diff --git a/test/fuzz/fuzz-network-parser/23-active-slave.network b/test/fuzz/fuzz-network-parser/23-active-slave similarity index 100% rename from test/fuzz/fuzz-network-parser/23-active-slave.network rename to test/fuzz/fuzz-network-parser/23-active-slave diff --git a/test/fuzz/fuzz-network-parser/23-bond199.network b/test/fuzz/fuzz-network-parser/23-bond199 similarity index 100% rename from test/fuzz/fuzz-network-parser/23-bond199.network rename to test/fuzz/fuzz-network-parser/23-bond199 diff --git a/test/fuzz/fuzz-network-parser/23-emit-lldp.network b/test/fuzz/fuzz-network-parser/23-emit-lldp similarity index 100% rename from test/fuzz/fuzz-network-parser/23-emit-lldp.network rename to test/fuzz/fuzz-network-parser/23-emit-lldp diff --git a/test/fuzz/fuzz-network-parser/23-primary-slave.network b/test/fuzz/fuzz-network-parser/23-primary-slave similarity index 100% rename from test/fuzz/fuzz-network-parser/23-primary-slave.network rename to test/fuzz/fuzz-network-parser/23-primary-slave diff --git a/test/fuzz/fuzz-network-parser/23-test1-bond199.network b/test/fuzz/fuzz-network-parser/23-test1-bond199 similarity index 100% rename from test/fuzz/fuzz-network-parser/23-test1-bond199.network rename to test/fuzz/fuzz-network-parser/23-test1-bond199 diff --git a/test/fuzz/fuzz-network-parser/24-lldp.network b/test/fuzz/fuzz-network-parser/24-lldp similarity index 100% rename from test/fuzz/fuzz-network-parser/24-lldp.network rename to test/fuzz/fuzz-network-parser/24-lldp diff --git a/test/fuzz/fuzz-network-parser/24-search-domain.network b/test/fuzz/fuzz-network-parser/24-search-domain similarity index 100% rename from test/fuzz/fuzz-network-parser/24-search-domain.network rename to test/fuzz/fuzz-network-parser/24-search-domain diff --git a/test/fuzz/fuzz-network-parser/25-address-link-section.network b/test/fuzz/fuzz-network-parser/25-address-link-section similarity index 100% rename from test/fuzz/fuzz-network-parser/25-address-link-section.network rename to test/fuzz/fuzz-network-parser/25-address-link-section diff --git a/test/fuzz/fuzz-network-parser/25-address-section.network b/test/fuzz/fuzz-network-parser/25-address-section similarity index 100% rename from test/fuzz/fuzz-network-parser/25-address-section.network rename to test/fuzz/fuzz-network-parser/25-address-section diff --git a/test/fuzz/fuzz-network-parser/25-address-section-miscellaneous.network b/test/fuzz/fuzz-network-parser/25-address-section-misc similarity index 100% rename from test/fuzz/fuzz-network-parser/25-address-section-miscellaneous.network rename to test/fuzz/fuzz-network-parser/25-address-section-misc diff --git a/test/fuzz/fuzz-network-parser/25-fibrule-port-range.network b/test/fuzz/fuzz-network-parser/25-fibrule-port-range similarity index 100% rename from test/fuzz/fuzz-network-parser/25-fibrule-port-range.network rename to test/fuzz/fuzz-network-parser/25-fibrule-port-range diff --git a/test/fuzz/fuzz-network-parser/25-ipv6-address-label-section.network b/test/fuzz/fuzz-network-parser/25-ipv6-address-label-section similarity index 100% rename from test/fuzz/fuzz-network-parser/25-ipv6-address-label-section.network rename to test/fuzz/fuzz-network-parser/25-ipv6-address-label-section diff --git a/test/fuzz/fuzz-network-parser/25-link-section-unmanaged.network b/test/fuzz/fuzz-network-parser/25-link-section-unmanaged similarity index 100% rename from test/fuzz/fuzz-network-parser/25-link-section-unmanaged.network rename to test/fuzz/fuzz-network-parser/25-link-section-unmanaged diff --git a/test/fuzz/fuzz-network-parser/25-neighbor-section.network b/test/fuzz/fuzz-network-parser/25-neighbor-section similarity index 100% rename from test/fuzz/fuzz-network-parser/25-neighbor-section.network rename to test/fuzz/fuzz-network-parser/25-neighbor-section diff --git a/test/fuzz/fuzz-network-parser/25-route-section.network b/test/fuzz/fuzz-network-parser/25-route-section similarity index 100% rename from test/fuzz/fuzz-network-parser/25-route-section.network rename to test/fuzz/fuzz-network-parser/25-route-section diff --git a/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings.network b/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings similarity index 100% rename from test/fuzz/fuzz-network-parser/25-route-tcp-window-settings.network rename to test/fuzz/fuzz-network-parser/25-route-tcp-window-settings diff --git a/test/fuzz/fuzz-network-parser/25-route-type.network b/test/fuzz/fuzz-network-parser/25-route-type similarity index 100% rename from test/fuzz/fuzz-network-parser/25-route-type.network rename to test/fuzz/fuzz-network-parser/25-route-type diff --git a/test/fuzz/fuzz-network-parser/25-sysctl.network b/test/fuzz/fuzz-network-parser/25-sysctl similarity index 100% rename from test/fuzz/fuzz-network-parser/25-sysctl.network rename to test/fuzz/fuzz-network-parser/25-sysctl diff --git a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1.network b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1 similarity index 100% rename from test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1.network rename to test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1 diff --git a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2.network b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2 similarity index 100% rename from test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2.network rename to test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2 diff --git a/test/fuzz/fuzz-network-parser/27-xfrm.network b/test/fuzz/fuzz-network-parser/27-xfrm similarity index 100% rename from test/fuzz/fuzz-network-parser/27-xfrm.network rename to test/fuzz/fuzz-network-parser/27-xfrm diff --git a/test/fuzz/fuzz-network-parser/bridge99.network b/test/fuzz/fuzz-network-parser/bridge99 similarity index 100% rename from test/fuzz/fuzz-network-parser/bridge99.network rename to test/fuzz/fuzz-network-parser/bridge99 diff --git a/test/fuzz/fuzz-network-parser/configure-without-carrier.network b/test/fuzz/fuzz-network-parser/configure-without-carrier similarity index 100% rename from test/fuzz/fuzz-network-parser/configure-without-carrier.network rename to test/fuzz/fuzz-network-parser/configure-without-carrier diff --git a/test/fuzz/fuzz-network-parser/dhcp-client.network b/test/fuzz/fuzz-network-parser/dhcp-client similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client.network rename to test/fuzz/fuzz-network-parser/dhcp-client diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-anonymize.network b/test/fuzz/fuzz-network-parser/dhcp-client-anonymize similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-anonymize.network rename to test/fuzz/fuzz-network-parser/dhcp-client-anonymize diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-critical-connection.network b/test/fuzz/fuzz-network-parser/dhcp-client-critical-connection similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-critical-connection.network rename to test/fuzz/fuzz-network-parser/dhcp-client-critical-connection diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings.network rename to test/fuzz/fuzz-network-parser/dhcp-client-ipv4-dhcp-settings diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only-ipv6-disabled.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-no-ipv6 similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only-ipv6-disabled.network rename to test/fuzz/fuzz-network-parser/dhcp-client-ipv4-no-ipv6 diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only.network rename to test/fuzz/fuzz-network-parser/dhcp-client-ipv4-only diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only.network rename to test/fuzz/fuzz-network-parser/dhcp-client-ipv6-only diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit.network b/test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit.network rename to test/fuzz/fuzz-network-parser/dhcp-client-ipv6-rapid-commit diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-listen-port.network b/test/fuzz/fuzz-network-parser/dhcp-client-listen-port similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-listen-port.network rename to test/fuzz/fuzz-network-parser/dhcp-client-listen-port diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-route-metric.network b/test/fuzz/fuzz-network-parser/dhcp-client-route-metric similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-route-metric.network rename to test/fuzz/fuzz-network-parser/dhcp-client-route-metric diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-route-table.network b/test/fuzz/fuzz-network-parser/dhcp-client-route-table similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-route-table.network rename to test/fuzz/fuzz-network-parser/dhcp-client-route-table diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router.network b/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-client-timezone-router.network rename to test/fuzz/fuzz-network-parser/dhcp-client-timezone-router diff --git a/test/fuzz/fuzz-network-parser/dhcp-server.network b/test/fuzz/fuzz-network-parser/dhcp-server similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-server.network rename to test/fuzz/fuzz-network-parser/dhcp-server diff --git a/test/fuzz/fuzz-network-parser/dhcp-server-static-lease.network b/test/fuzz/fuzz-network-parser/dhcp-server-static-lease similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-server-static-lease.network rename to test/fuzz/fuzz-network-parser/dhcp-server-static-lease diff --git a/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router.network b/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-server-timezone-router.network rename to test/fuzz/fuzz-network-parser/dhcp-server-timezone-router diff --git a/test/fuzz/fuzz-network-parser/dhcp-server-veth-peer.network b/test/fuzz/fuzz-network-parser/dhcp-server-veth-peer similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-server-veth-peer.network rename to test/fuzz/fuzz-network-parser/dhcp-server-veth-peer diff --git a/test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer.network b/test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer similarity index 100% rename from test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer.network rename to test/fuzz/fuzz-network-parser/dhcp-v4-server-veth-peer diff --git a/test/fuzz/fuzz-network-parser/directives.network b/test/fuzz/fuzz-network-parser/directives similarity index 100% rename from test/fuzz/fuzz-network-parser/directives.network rename to test/fuzz/fuzz-network-parser/directives diff --git a/test/fuzz/fuzz-network-parser/dns-trust-anchor-duplicate.network b/test/fuzz/fuzz-network-parser/dns-trust-anchor-duplicate similarity index 100% rename from test/fuzz/fuzz-network-parser/dns-trust-anchor-duplicate.network rename to test/fuzz/fuzz-network-parser/dns-trust-anchor-duplicate diff --git a/test/fuzz/fuzz-network-parser/gretap.network b/test/fuzz/fuzz-network-parser/gretap similarity index 100% rename from test/fuzz/fuzz-network-parser/gretap.network rename to test/fuzz/fuzz-network-parser/gretap diff --git a/test/fuzz/fuzz-network-parser/gretun.network b/test/fuzz/fuzz-network-parser/gretun similarity index 100% rename from test/fuzz/fuzz-network-parser/gretun.network rename to test/fuzz/fuzz-network-parser/gretun diff --git a/test/fuzz/fuzz-network-parser/ip6gretap.network b/test/fuzz/fuzz-network-parser/ip6gretap similarity index 100% rename from test/fuzz/fuzz-network-parser/ip6gretap.network rename to test/fuzz/fuzz-network-parser/ip6gretap diff --git a/test/fuzz/fuzz-network-parser/ip6tnl.network b/test/fuzz/fuzz-network-parser/ip6tnl similarity index 100% rename from test/fuzz/fuzz-network-parser/ip6tnl.network rename to test/fuzz/fuzz-network-parser/ip6tnl diff --git a/test/fuzz/fuzz-network-parser/ipip.network b/test/fuzz/fuzz-network-parser/ipip similarity index 100% rename from test/fuzz/fuzz-network-parser/ipip.network rename to test/fuzz/fuzz-network-parser/ipip diff --git a/test/fuzz/fuzz-network-parser/ipv6-prefix.network b/test/fuzz/fuzz-network-parser/ipv6-prefix similarity index 100% rename from test/fuzz/fuzz-network-parser/ipv6-prefix.network rename to test/fuzz/fuzz-network-parser/ipv6-prefix diff --git a/test/fuzz/fuzz-network-parser/ipv6-prefix-veth.network b/test/fuzz/fuzz-network-parser/ipv6-prefix-veth similarity index 100% rename from test/fuzz/fuzz-network-parser/ipv6-prefix-veth.network rename to test/fuzz/fuzz-network-parser/ipv6-prefix-veth diff --git a/test/fuzz/fuzz-network-parser/ipvlan.network b/test/fuzz/fuzz-network-parser/ipvlan similarity index 100% rename from test/fuzz/fuzz-network-parser/ipvlan.network rename to test/fuzz/fuzz-network-parser/ipvlan diff --git a/test/fuzz/fuzz-network-parser/macvlan.network b/test/fuzz/fuzz-network-parser/macvlan similarity index 100% rename from test/fuzz/fuzz-network-parser/macvlan.network rename to test/fuzz/fuzz-network-parser/macvlan diff --git a/test/fuzz/fuzz-network-parser/macvtap.network b/test/fuzz/fuzz-network-parser/macvtap similarity index 100% rename from test/fuzz/fuzz-network-parser/macvtap.network rename to test/fuzz/fuzz-network-parser/macvtap diff --git a/test/fuzz/fuzz-network-parser/routing-policy-rule.network b/test/fuzz/fuzz-network-parser/routing-policy-rule similarity index 100% rename from test/fuzz/fuzz-network-parser/routing-policy-rule.network rename to test/fuzz/fuzz-network-parser/routing-policy-rule diff --git a/test/fuzz/fuzz-network-parser/sit.network b/test/fuzz/fuzz-network-parser/sit similarity index 100% rename from test/fuzz/fuzz-network-parser/sit.network rename to test/fuzz/fuzz-network-parser/sit diff --git a/test/fuzz/fuzz-network-parser/test-static.network b/test/fuzz/fuzz-network-parser/test-static similarity index 100% rename from test/fuzz/fuzz-network-parser/test-static.network rename to test/fuzz/fuzz-network-parser/test-static diff --git a/test/fuzz/fuzz-network-parser/vti.network b/test/fuzz/fuzz-network-parser/vti similarity index 100% rename from test/fuzz/fuzz-network-parser/vti.network rename to test/fuzz/fuzz-network-parser/vti diff --git a/test/fuzz/fuzz-network-parser/vti6.network b/test/fuzz/fuzz-network-parser/vti6 similarity index 100% rename from test/fuzz/fuzz-network-parser/vti6.network rename to test/fuzz/fuzz-network-parser/vti6 diff --git a/test/fuzz/fuzz-network-parser/vxlan.network b/test/fuzz/fuzz-network-parser/vxlan similarity index 100% rename from test/fuzz/fuzz-network-parser/vxlan.network rename to test/fuzz/fuzz-network-parser/vxlan diff --git a/test/fuzz/fuzz-nspawn-settings/leak-4ff0e2498f596a77ea68d185c61e9e9ff9bb657f b/test/fuzz/fuzz-nspawn-settings/leak-bind-mount similarity index 100% rename from test/fuzz/fuzz-nspawn-settings/leak-4ff0e2498f596a77ea68d185c61e9e9ff9bb657f rename to test/fuzz/fuzz-nspawn-settings/leak-bind-mount diff --git a/test/networkd-test.py b/test/networkd-test.py index 1001cd7cc8..4b5ba622fa 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -7,7 +7,7 @@ # but it assumes (and checks at the beginning) that networkd is not currently # running. # -# This can be run on a normal installation, in QEMU, nspawn (with +# This can be run on a normal installation, in qemu, systemd-nspawn (with # --private-network), LXD (with "--config raw.lxc=lxc.aa_profile=unconfined"), # or LXC system containers. You need at least the "ip" tool from the iproute # package; it is recommended to install dnsmasq too to get full test coverage. diff --git a/test/test-functions b/test/test-functions index 365f535bf0..90c8f79468 100644 --- a/test/test-functions +++ b/test/test-functions @@ -60,7 +60,7 @@ get_bool() { fi } -# Decide if we can (and want to) run QEMU with KVM acceleration. +# Decide if we can (and want to) run qemu with KVM acceleration. # Check if nested KVM is explicitly enabled (TEST_NESTED_KVM). If not, # check if it's not explicitly disabled (TEST_NO_KVM) and we're not already # running under KVM. If these conditions are met, enable KVM (and possibly @@ -310,7 +310,7 @@ find_qemu_bin() { esac if [[ ! -e "$QEMU_BIN" ]]; then - echo "Could not find a suitable QEMU binary" >&2 + echo "Could not find a suitable qemu binary" >&2 return 1 fi } @@ -334,8 +334,8 @@ qemu_min_version() { printf "%s\n%s\n" "$1" "$qemu_ver" | sort -V -C } -# Return 0 if QEMU did run (then you must check the result state/logs for actual -# success), or 1 if QEMU is not available. +# Return 0 if qemu did run (then you must check the result state/logs for actual +# success), or 1 if qemu is not available. run_qemu() { if [ -f /etc/machine-id ]; then read -r MACHINE_ID &2 + echo "TEST: $TEST_DESCRIPTION [SKIPPED]: both qemu and nspawn disabled" >&2 exit 0 fi if get_bool "${TEST_QEMU_ONLY:=}" && ! get_bool "$TEST_NO_NSPAWN"; then - echo "TEST: $TEST_DESCRIPTION [SKIPPED]: QEMU-only tests requested" >&2 + echo "TEST: $TEST_DESCRIPTION [SKIPPED]: qemu-only tests requested" >&2 exit 0 fi diff --git a/tools/check-directives.sh b/tools/check-directives.sh index af846c4d73..767833285b 100755 --- a/tools/check-directives.sh +++ b/tools/check-directives.sh @@ -34,8 +34,8 @@ function generate_directives() { ret=0 if ! diff \ <(generate_directives "$SOURCE_ROOT"/src/network/networkd-network-gperf.gperf | sort) \ - <(sort "$SOURCE_ROOT"/test/fuzz/fuzz-network-parser/directives.network); then - echo "Looks like test/fuzz/fuzz-network-parser/directives.network hasn't been updated" + <(sort "$SOURCE_ROOT"/test/fuzz/fuzz-network-parser/directives); then + echo "Looks like test/fuzz/fuzz-network-parser/directives hasn't been updated" ret=1 fi