1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00
Commit Graph

17 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
0bf9bbecae tools: consistently use #!/usr/bin/env python3
It's ugly, but it's better to be consistently ugly.
2025-07-25 12:33:13 +02:00
Yu Watanabe
8269396078 integration-test: show journalctl command for showing saved journal when TEST_SAVE_JOURNAL=1 2025-07-25 04:54:38 +09:00
Luca Boccassi
375d80b04a ci: re-enable uefi secure boot
Kernel 6.11.0-1018-azure is now in use, which has a workaround
for the HyperV bug, so this should work again in GHA
2025-07-12 21:07:58 +09:00
DaanDeMeyer
42c288dfd8 test: Fix --capability=CAP_BPF condition
We also run in a VM if we're not running as root, yet we weren't
checking this when deciding whether to pass --capability=CAP_BPF or
not. Let's fix that.

Follow up for 9554ac3052
2025-07-11 16:08:00 +02:00
Matteo Croce
9554ac3052 tests: run test with CAP_BPF
Add CAP_BPF to tests run with nspawn, so we don't have to use a VM
to test BPF calls.
2025-07-08 18:23:46 +02:00
Luca Boccassi
c0a5801f7b mkosi: enable arm64 job
There's no acceleration, so nested VMs are too slow, only enable
nspawn.
2025-07-04 17:39:29 +01:00
Yu Watanabe
59dd650501 TEST-21-DFUZZER: skip test when no sanitizer is enabled 2025-05-14 02:28:22 +09:00
Daan De Meyer
45f63c3db7 test: Add custom signal handlers to integration test wrapper script
meson will send SIGTERM if the test gets stuck and hits the timeout,
in which case we still want to do log saving and analysis, so let's
add some signal handlers which allow us to do that.

This won't be very useful until https://github.com/mesonbuild/meson/pull/14513
lands, since we only get half a second from meson to handle SIGTERM
before it sends SIGKILL, but let's land this already so we immediately
start taking advantage of the meson fix once it lands.
2025-04-25 06:11:43 +09:00
Daan De Meyer
710653d3bc test: Use meson add_test_setup() instead of environment variables
We add a default test setup that excludes the integration-tests suite
so that the integration tests don't run by default. This allows us to
get rid of $SYSTEMD_INTEGRATION_TESTS. Then, we add two extra setups:
'integration' and 'shell'. The 'integration' setup does not exclude the
integration-tests suite, and so can be used to run the integration tests.
The 'shell' setup does the same, but additionally sets $TEST_SHELL=1,
allowing to get rid of $TEST_SHELL in the docs.
2025-04-17 20:31:08 +02:00
Daan De Meyer
9c8646646c integration-tests: Don't enable tpm for every single test 2025-04-11 06:20:25 +09:00
Daan De Meyer
beecd4e344 test: Fix typing error in integration-test-wrapper.py 2025-04-11 06:20:25 +09:00
Daan De Meyer
5b21c43e98 test: Be smarter about detecting the mkosi configuration directory
Instead of always looking up two directories from the
test/integration-tests/meson.build file, let's search in up to 4
parent directories from the given meson project source root. This
allows us to just pass in meson.project_source_root() to
integration-test-wrapper.py instead of having to pass in a fixed
relative offset from the current meson file.

It'll also allow us to install the integration tests and mkosi
configuration in the future without breaking the standalone
integrationt tests functionality;
2025-04-03 10:21:54 +02:00
Luca Boccassi
f5c626df2c test: skip TEST-06-SELINUX if not on fedora/centos
The test skips at runtime on the same condition, but that's already too late
as it often gets stuck on boot in Debian/Ubuntu. Check in the meson
condition directly so that it's not even started.
2025-04-02 15:04:20 +01:00
Daan De Meyer
e7df838a07 test: Use /dev/shm for TEST_JOURNAL_USE_TMP if /tmp isn't tmpfs
If /dev/shm is a tmpfs and /tmp isn't, use /dev/shm instead.
2025-03-28 11:40:39 +01:00
Daan De Meyer
29a1e7df64 test: Mark tests as skipped if requirements were not satisfied
Instead of not creating the test at all, let's always create test but
simply mark them as skipped as this is more observable than simply not
creating the test at all.
2025-03-28 11:40:39 +01:00
Daan De Meyer
51b4920746 test: Boot integration test VMs without an initrd if possible
If we don't need an initrd, let's not waste time in one. We have to
gate this by distributions that have the necessary kernel modules to
make this work as builtin modules, hopefully we can expand the list in
the future.
2025-03-28 11:40:39 +01:00
Daan De Meyer
d9f48358bd test: Make it possible to run the integration tests standalone
Currently, to run the integration tests, it's still necessary to
install various other build tools besides meson: A compiler, gperf,
libcap, ... which we want to avoid in CI systems where we receive
prebuilt systemd packages and only want to test them. Examples are
Debian's autopkgtest CI and Fedora CI. Let's make it possible for
these systems to run the integration tests without having to install
any other build dependency besides meson by extracting the logic
required to run the integration tests with meson into a separate
subdirectory and adding a standalone top-level meson.build file which
can be used to configure a meson tree with as its only purpose running
the integration tests.

Practically, we do the following:
- all the integration test directories and integration-test-wrapper.py
  are moved from test/ to test/integration-test/.
- All the installation logic is kept out of test/integration-test/ or
  any of its subdirectories and moved into test/meson.build instead.
- We add test/integration-test/standalone/meson.build to run the
  integration tests standalone. This meson file includes
  test/integration-test via a cute symlink hack to trick meson into
  including a parent directory with subdir().
- Documentation is included on how to use the new standalone mode.
- TEST-64-UDEV-STORAGE and TEST-85-NETWORK are changed to generate separate
  units for each testcase to make them behave more like the other integration
  tests.
2025-03-27 21:37:13 +01:00