Commit Graph
5581 Commits
Author SHA1 Message Date
Daan De Meyer 8e3347f3bd fmf: Only mess with /etc/yum.repos.d when running within testing farm
If running tmt locally to debug the test script, make sure we don't
mess with /etc/yum.repos.d.
2025-01-08 13:37:23 +01:00
Daan De Meyer fc1b08dee2 fmf: Fix glob
Globs inside quotes aren't expanded and we need the glob to be more
specific to avoid matching multiple entries inside the tmt source
directory.
2025-01-08 11:15:43 +01:00
Daan De Meyer 0a85b37579 fmf: Fix dist-git example
All that's needed is dist-git-source: true so remove the other settings
that aren't required.
2025-01-08 10:25:50 +01:00
Daan De Meyer 0250db0139 fmf: Don't fail if we can't put selinux in permissive mode
The tests might be running unprivileged or in an environment without
selinux so let's not fail if we can't put it in permissive mode.
2025-01-08 10:25:05 +01:00
Lennart Poettering 0dfd89fa32 udev: introduce io.systemd.Udev varlink interface (#35721)
Replaces #25523.
2025-01-07 16:49:37 +01:00
Daan De Meyer 3c9ffd2e4b fmf: Check out target branch in packit 2025-01-07 15:27:19 +01:00
Luca Boccassi f2b34ce7f3 test: add test case for AddDependencyUnitFiles assert
Follow-up for d87dc74e8f
2025-01-07 11:35:03 +00:00
Yu Watanabe d5c4c4d45c TEST-17-UDEV: wait for udevd being restarted after exit control command
Also wait for created devices being processed before running tests.
2025-01-07 20:31:15 +09:00
Daan De Meyer 2144b5dccf machine: introduce io.systemd.Machine.{CopyFrom, CopyTo} methods (#34913)
This PR introduces io.systemd.Machine.CopyFrom and CopyTo method which
are DBus alternatives of:
- CopyFromMachine
- CopyToMachine
- CopyFromMachineWithFlags
- CopyToMachineWithFlags

The PR also contain tests
2025-01-06 23:16:33 +01:00
Luca Boccassi 861d0c081a tree-wide: drop references to CentoS/RHEL 7 and 8 (#35881) 2025-01-06 18:38:05 +00:00
Yu Watanabe 220f7aac8c test-network: drop workaround for old CentOS release 2025-01-07 02:06:04 +09:00
Yu Watanabe 1761c35275 test-network: nowadays it runs not only on CentOS 2025-01-07 02:06:04 +09:00
Daan De Meyer 0eb7e29dfb fmf: Support being used downstream in dist-git tests
We can use our upstream fmf definitions to run downstream tests in
the Fedora systemd dist-git repository
(https://src.fedoraproject.org/rpms/systemd). To have access to the
dist-git sources when running the tests, we enable dist-git-source: true
downstream which makes the sources available in $TMT_SOURCE_DIR so
let's make sure we use those sources if they're available.
2025-01-06 16:30:23 +01:00
Daan De Meyer 9e76e9c9dc fmf: Insist on mkosi sha being available
Let's assume the workflow file containing the mkosi always being
available.

Also fix the detection while we're at it by not leaving the systemd
directory.
2025-01-06 16:29:28 +01:00
Ivan Kruglov 825fff7fac machine: move io.systemd.Machine.Map* tests into right position 2025-01-06 14:51:57 +01:00
Ivan Kruglov 24b7e0b894 machine: tests for io.systemd.Machine.{CopyFrom, CopyTo} methods 2025-01-06 14:51:57 +01:00
Daan De Meyer 28baef47a3 mkosi: Migrate more deprecated options 2025-01-06 12:07:53 +01:00
Daan De Meyer b0b88f18b3 packit: Move fmf metadata into upstream
This moves https://src.fedoraproject.org/tests/systemd into upstream
so it's one less moving piece that we need to remember. While we're at
it, do various cleanups as well:

- Remove non-packit logic
- Set NO_BUILD in mkosi.local.conf as it's not picked up from the
  process environment
- Don't set unused environment variables
- Remove workdir logic as we run in an ephemeral VM already
- Drop --verbose from meson test to reduce noise
  from passed tests
- Use mkosi sandbox and drop duplicated deps from metadata file
- Stop running the unit tests as they already run as part of the rpm
  build and as part of the integration tests.
- Various style fixes
2025-01-05 23:21:36 +01:00
Daan De Meyer c008b70370 mkosi: Update to latest 2025-01-05 21:18:32 +01:00
Daan De Meyer d0d647e084 Introduce systemd-pty-forward (#35761)
This allows running a command with tinted terminal background.
2025-01-03 19:34:42 +01:00
Daan De Meyer bcb10ac473 TEST-74-AUX-UTILS: Use tee
Something is failing but we can't see what from the logs so let's use
tee so we can.
2025-01-03 19:32:48 +01:00
Daan De Meyer 8224a48da9 Introduce systemd-pty-forward
This allows running a command with tinted terminal background.
2025-01-03 17:07:33 +01:00
Daan De Meyer b0e9ac018d machine: introduce io.systemd.Machine.BindMount method (#35066)
This PR introduces io.systemd.Machine.BindMount method which is
alternative to DBus's BindMountMachine.
2025-01-03 13:19:48 +01:00
Luca Boccassi 2976730a4d resolved: stop mdns/lnrr when config changes to disabled on reload
Currently on reload mdns/lnrr are enabled if they were disabled,
but not viceversa. Fix it.

Follow-up for 14a5217679
2025-01-03 09:22:45 +01:00
Daan De Meyer 628a3fc287 network/dhcp: introduce global setting for DHCPv4 client identifier (#35783)
Typically, the same client identifier setting is used for all
interfaces. Hence, better to provide the system-wide setting to specify
the client identifier.
2025-01-03 09:19:55 +01:00
Lennart Poettering 5ff7046e61 ask-password: add varlink IPC interface and various other additions and fixes (#35074) 2025-01-02 18:21:35 +01:00
Lennart Poettering ed8e7e2393 core/socket: several fixlets (#35637)
Fixes https://github.com/systemd/systemd/issues/35635
2025-01-02 18:20:48 +01:00
Luca Boccassi 0182958047 test: update README's Ubuntu CI section for mkosi changes 2025-01-02 17:04:30 +00:00
Ivan Kruglov 40c3be4828 machine: tests for io.systemd.Machine.BindMount 2025-01-02 16:58:16 +01:00
Lennart Poettering 3fbca0e23a test: add CI test validating the new varlink interface and more 2025-01-02 16:39:33 +01:00
Daan De Meyer 722e0ccf0e docs: Update code coverage documentation 2025-01-02 16:25:19 +01:00
Daan De Meyer 8a65263650 docs: Use mkosi sandbox in test documentation as well
Same change as in HACKING.md, but for running the integration tests.
2025-01-02 16:17:53 +01:00
Mike Yuan 7c194bb93c TEST-07-PID1: add test case for #35635 2024-12-31 00:22:53 +01:00
Mike Yuan d8a2ed33fd test: move test for MaxConnectionsPerSource= to TEST-07-PID1
Follow-up for 3456c89ac2
2024-12-31 00:22:53 +01:00
Yu Watanabe 5e5fe05896 test-network: add test cases for global [DHCPv4] ClientIdentifier= setting 2024-12-30 11:19:02 +09:00
Yu Watanabe 8bc4a6e5cd TEST-74-AUX: add reproducer of issue #35746
Addresses https://github.com/systemd/systemd/pull/35752#pullrequestreview-2523080117.
2024-12-28 12:02:13 +00:00
Yu Watanabe f19f640513 logs-show: skip journal entry with an invalid timestamp
Follow-up for 275e6be052.
Fixes oss-fuzz#385221809 (https://issues.oss-fuzz.com/issues/385221809).
Fixes #35737.
2024-12-28 14:13:39 +09:00
Luca Boccassi 16406420ea test: answer 2nd mdadm --create question for compat with new version
New version of mdadm now asks a second question, so send 'y' twice
to it in the test scripts

[    5.253483] TEST-64-UDEV-STORAGE.sh[684]: + echo y
[    5.254412] TEST-64-UDEV-STORAGE.sh[685]: + mdadm --create /dev/md/mdmirror --name mdmirror --uuid aaaaaaaa:bbbbbbbb:cccccccc:00000001 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm0 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm1 -v -f --level=1 --raid-devices=2
[    5.254759] TEST-64-UDEV-STORAGE.sh[685]: To optimalize recovery speed, it is recommended to enable write-indent bitmap, do you want to enable it now? [y/N]? mdadm: Note: this array has metadata at the start and
[    5.255085] TEST-64-UDEV-STORAGE.sh[685]:     may not be suitable as a boot device.  If you plan to
[    5.255418] TEST-64-UDEV-STORAGE.sh[685]:     store '/boot' on this device please ensure that
[    5.255745] TEST-64-UDEV-STORAGE.sh[685]:     your boot-loader understands md/v1.x metadata, or use
[    5.256285] TEST-64-UDEV-STORAGE.sh[685]:     --metadata=0.90
[    5.256672] TEST-64-UDEV-STORAGE.sh[685]: mdadm: size set to 64512K
[    5.257063] TEST-64-UDEV-STORAGE.sh[685]: Continue creating array [y/N]? mdadm: create aborted.

This is backward compatible with the older version that asks just one
question
2024-12-22 15:43:06 +00:00
Lennart Poettering ccaa76ac48 image-discovery: add per-user scope (#35510) 2024-12-20 22:12:35 +01:00
Lennart Poettering 2232038187 pid1: complete per-user credentials support (#35536)
Fixes: #33887 #33796 #33318
2024-12-20 22:12:08 +01:00
Daan De Meyer 3ee5cab490 docs: Move fuzzers documentation to test README.md 2024-12-20 20:09:35 +01:00
Lennart Poettering 1c0ade2e1f discover-image: introduce per-user image directories
We nowadays support unprivileged invocation of systemd-nspawn +
systemd-vmspawn, but there was no support for discovering suitable disk
images (i.e. no per-user counterpart of /var/lib/machines). Add this
now, and hook it up everywhere.

Instead of hardcoding machined's, importd's, portabled's, sysupdated's
image discovery to RUNTIME_SCOPE_SYSTEM I introduced a field that make
the scope variable, even if this field is always initialized to
RUNTIME_SCOPE_SYSTEM for now. I think these four services should
eventually be updated to support a per-user concept too, this is
preparation for that, even though it doesn't outright add support for
this.

This is for the largest part not user visible, except for in nspawn,
vmspawn and the dissect tool. For the latter I added a pair of
--user/--system switches to select the discovery scope.
2024-12-20 18:04:01 +01:00
Lennart Poettering 026dfd60d4 test: add integration test that makes sure unpriv creds work correctly
This checks both the per-user credstore directory logic, and that
unprivileged, encrypted credentials work.
2024-12-20 17:52:04 +01:00
Lennart Poettering f108996319 core/device: handle ID_PROCESSING udev property (#35351)
Continuation of #35332.
2024-12-20 10:12:39 +01:00
Daan De Meyer dec47e58a6 debug-generator: add a kernel cmdline option to pause the boot process (#35410)
Introduce the `systemd.break=` kernel command line option to allow
stopping the boot process at a certain point and spawn a debug shell.
After exiting this shell, the system will resume booting.

It accepts the following values:
- `pre-udev`: before starting to process kernel uevents (initrd and
host).
- `pre-basic`: before leaving early boot and regular services start
(initrd and host).
- `pre-mount`: before the root filesystem is mounted (initrd).
- `pre-switch-root`: before switching root (initrd).
2024-12-20 10:04:41 +01:00
Yu Watanabe 182ffb5819 TEST-71-HOSTNAME: do not start user session
The user session may trigger hostnamed, and the job of stopping
hostnamed may be cancelled, and the test may fail:
```
[ 4633.613578] TEST-71-HOSTNAME.sh[175]: + stop_hostnamed
[ 4633.613578] TEST-71-HOSTNAME.sh[175]: + systemctl stop systemd-hostnamed.service
[ 4633.664670] systemd[1]: Stopping systemd-hostnamed.service - Hostname Service...
[ 4636.022277] systemd-logind[121]: New session c2 of user root.
[ 4636.032532] systemd[1]: Created slice user-0.slice - User Slice of UID 0.
[ 4636.042675] systemd[1]: Starting user-runtime-dir@0.service - User Runtime Directory /run/user/0...
[ 4636.176140] systemd[1]: Finished user-runtime-dir@0.service - User Runtime Directory /run/user/0.
[ 4636.202951] systemd[1]: Starting user@0.service - User Manager for UID 0...
[ 4636.292204] systemd-logind[121]: New session c3 of user root.
[ 4636.300065] (systemd)[268]: pam_unix(systemd-user:session): session opened for user root(uid=0) by root(uid=0)
[ 4636.757667] systemd[268]: Queued start job for default target default.target.
[ 4636.774419] systemd[268]: Created slice app.slice - User Application Slice.
[ 4636.774579] systemd[268]: Started systemd-tmpfiles-clean.timer - Daily Cleanup of User's Temporary Directories.
[ 4636.774747] systemd[268]: Reached target paths.target - Paths.
[ 4636.776418] systemd[268]: Reached target sysinit.target - System Initialization.
[ 4636.776604] systemd[268]: Reached target timers.target - Timers.
[ 4636.784997] systemd[268]: Starting dbus.socket - D-Bus User Message Bus Socket...
[ 4636.799472] systemd[268]: Starting systemd-tmpfiles-setup.service - Create User Files and Directories...
[ 4637.027125] systemd[268]: Finished systemd-tmpfiles-setup.service - Create User Files and Directories.
[ 4637.031721] systemd[268]: Listening on dbus.socket - D-Bus User Message Bus Socket.
[ 4637.036189] systemd[268]: Reached target sockets.target - Sockets.
[ 4637.036373] systemd[268]: Reached target basic.target - Basic System.
[ 4637.036558] systemd[268]: Reached target default.target - Main User Target.
[ 4637.036646] systemd[268]: Startup finished in 702ms.
[ 4637.049075] systemd[1]: Started user@0.service - User Manager for UID 0.
[ 4637.075263] systemd[1]: Started session-c2.scope - Session c2 of User root.
[ 4637.084917] login[136]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)
[ 4637.117348] login[136]: ROOT LOGIN ON pts/0
[ 4637.238572] systemctl[261]: Job for systemd-hostnamed.service canceled.
[ 4637.290369] systemd[1]: TEST-71-HOSTNAME.service: Main process exited, code=exited, status=1/FAILURE
```

Fixes #35643.
2024-12-20 09:36:51 +01:00
Antonio Alvarez Feijoo e9f781a5a4 debug-generator: add a kernel cmdline option to pause the boot process
Introduce the `systemd.break=` kernel command line option to allow stopping the
boot process at a certain point and spawn a debug shell. After exiting this
shell, the system will resume booting.

It accepts the following values:
- `pre-udev`: before starting to process kernel uevents (initrd and host).
- `pre-basic`: before leaving early boot and regular services start (initrd and
host).
- `pre-mount`: before the root filesystem is mounted (initrd).
- `pre-switch-root`: before switching root (initrd).
2024-12-20 08:51:23 +01:00
Yu Watanabe 5e837858e7 analyze: add "chid" verb to display CHIDs of the local system (#35175)
We already have the code for it, expose it in systemd-analyze, because
it's useful.
2024-12-20 11:47:03 +09:00
Yu Watanabe f01132aacf TEST-17: add test case for ID_PROCESSING flag on add uevent
Also, check the state of the device units on change event.
2024-12-20 10:52:57 +09:00
Yu Watanabe 3b9010b170 udev: support reloading udev.conf (#35458)
This makes systemd-udevd reload udev.conf when explicitly requested by
e.g. `udevadm control --reload`.
2024-12-20 09:00:48 +09:00