1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-24 06:04:05 +03:00

868 Commits

Author SHA1 Message Date
Daan De Meyer
5eef704734 repart: Add Minimize= support for verity hash partitions
Fixes #27414
2023-04-26 14:15:16 +02:00
Frantisek Sumsal
ad2875af9e test: add a couple of sanity tests for systemd-creds 2023-04-25 18:34:49 +02:00
Zbigniew Jędrzejewski-Szmek
4481a30855 test: use idiomatic bash loop iteration
In a few cases, also avoid a sleep in the last (failed) iteration of the loop.
It doesn't matter too much, but it's still ugly.
2023-04-24 21:59:28 +02:00
Zbigniew Jędrzejewski-Szmek
97b35c7cec testsuite-54: drop unnecessary pipe 2023-04-24 21:59:28 +02:00
Zbigniew Jędrzejewski-Szmek
add53f9b93 testsuite-70: drop unnecessary env 2023-04-24 21:59:27 +02:00
Zbigniew Jędrzejewski-Szmek
128db0aa00 test: drop uses of "&& { echo 'unexpected success'; exit 1; }"
Brief is sweet.
2023-04-24 21:58:35 +02:00
Zbigniew Jędrzejewski-Szmek
a1e5bd2066 testsuite-04: remove unnecessary conditional 2023-04-24 10:06:59 +02:00
Zbigniew Jędrzejewski-Szmek
f65c2f5214 testsuite-04: remove redirection, drop whitespace after redirection op 2023-04-24 10:06:59 +02:00
Luca Boccassi
21453b8b4b
Merge pull request #27349 from mrc0mmand/codespell
tree-wide: code spelling fixes
2023-04-20 22:02:17 +01:00
Frantisek Sumsal
94d82b5980 tree-wide: code spelling fixes
As reported by Fossies.
2023-04-20 21:54:59 +02:00
Frantisek Sumsal
574d09bad0 test: prefix the transient unit with test- to make coverage runs happy
See 9fd8226312 for more details.

Follow-up to c9210b7470.
2023-04-18 14:55:08 +01:00
Luca Boccassi
c9210b7470 creds: make available to all ExecStartPre= and ExecStart= processes
Fixes https://github.com/systemd/systemd/issues/27275
2023-04-17 17:47:28 +01:00
Yu Watanabe
f384ce1187
Merge pull request #27283 from mrc0mmand/assorted-test-tweaks
test: a bunch of assorted tweaks, Saturday edition
2023-04-16 19:39:58 +09:00
Frantisek Sumsal
f7f5657ece test: add a couple of basic sanity tests for the security verb 2023-04-16 09:21:13 +02:00
Frantisek Sumsal
a51ba8e31a test: add a couple of basic sanity tests for timedatectl 2023-04-16 09:21:13 +02:00
Luca Boccassi
4d7a06b322
Merge pull request #27273 from mrc0mmand/test-generators
test: add a couple of tests for getty/run/system-update generators
2023-04-14 21:31:55 +01:00
Frantisek Sumsal
3a8b7e8b5f test: stop the test unit when it's not needed anymore
Otherwise it keeps printing stuff to the journal/console, adding
unnecessary noise.
2023-04-14 21:13:14 +02:00
Frantisek Sumsal
e51d13d61d test: check the colored --version output 2023-04-14 21:07:51 +02:00
Frantisek Sumsal
bbbf16b3d7 test: add a couple of tests for run-generator 2023-04-14 17:05:55 +02:00
Frantisek Sumsal
657ea51341 test: add a couple of tests for system-update-generator 2023-04-14 16:09:32 +02:00
Frantisek Sumsal
d72cf09859 test: properly distinguish between generator phases
Let's make sure the units generated by generators are generated at the
right stage.
2023-04-14 15:44:01 +02:00
Frantisek Sumsal
e6c281c1cb test: add a couple of tests for getty-generator 2023-04-14 13:54:27 +02:00
Frantisek Sumsal
7faa4e3782 test: allow overriding PID1's environment for test purposes 2023-04-14 12:58:16 +02:00
Frantisek Sumsal
ff8d435db4 test: add a couple of test for fstab-related kernel cmdline args 2023-04-14 10:45:20 +02:00
Frantisek Sumsal
2d4eb78ce1 test: check if x-systemd.automount is ignored for rootfs 2023-04-14 10:45:20 +02:00
Frantisek Sumsal
53c5dc5446 test: run the generators with debug log level
unless requested otherwise.
2023-04-14 10:45:20 +02:00
Luca Boccassi
2cba2fcd25
Merge pull request #27144 from enr0n/fix-scope-timer-on-coldplug
scope: do not disable timer event source when state is SCOPE_RUNNING
2023-04-14 00:25:06 +01:00
Luca Boccassi
6ef721cbc7 user units: implicitly enable PrivateUsers= when sandboxing options are set
Enabling these options when not running as root requires a user
namespace, so implicitly enable PrivateUsers=.
This has a side effect as it changes which users are visible to the unit.
However until now these options did not work at all for user units, and
in practice just a handful of user units in Fedora, Debian and Ubuntu
mistakenly used them (and they have been all fixed since).

This fixes the long-standing confusing issue that the user and system
units take the same options but the behaviour is wildly (and sometimes
silently) different depending on which is which, with user units
requiring manually specifiying PrivateUsers= in order for sandboxing
options to actually work and not be silently ignored.
2023-04-13 21:33:48 +01:00
Luca Boccassi
ce963a747f
Merge pull request #27244 from bluca/uphold_retry
Uphold/StopWhenUnneeded/BindsTo: add retry timer on rate limit
2023-04-13 21:33:06 +01:00
Nick Rosbrook
af4688398f test: add some tests for RuntimeMaxSec
Make sure the RuntimeMaxSec is applied correctly to service and scope
units when they are started, and also on coldplug.
2023-04-13 15:43:30 -04:00
Luca Boccassi
0607a9f9da systemd-confext: mount confexts as noexec and nosuid
Confexts should not contain code, so mount confexts with noexec.
We cannot mount invidial extensions as noexec, as the overlay ignores
it and bypasses it, we need to use the flag on the whole overlay for
it to be effective.
But given there are legacy scripts still shipped in /etc, allow to
override it with --noexec=false.
2023-04-14 01:21:48 +08:00
Luca Boccassi
4c7a0fc8d0 Uphold/StopWhenUnneeded/BindsTo: requeue when job finishes
When a unit is upheld and fails, and there are no state changes in
the upholder, it will not be retried, which is against what the
documentation suggests.

Requeue when the job finishes. Same for the other two queues.
2023-04-13 13:28:25 +01:00
OMOJOLA JOSHUA DAMILOLA
96ead603b8 systemd-cryptenroll: add string aliases for tpm2 PCRs
Fixes #26697. RFE.
2023-04-13 12:08:32 +01:00
Lennart Poettering
39857544ee
Merge pull request #27027 from dtardon/unit-file-list-cleanup
Use _cleanup_ for UnitFileList hash
2023-04-13 09:10:17 +02:00
Lennart Poettering
3540ce8587 test: validate that fdstore pinning works 2023-04-13 06:44:27 +02:00
David Tardon
e7f5525fb0 test: also test client-side operation if applicable 2023-04-12 17:14:06 +02:00
Lennart Poettering
3af48a86d9
Merge pull request #25608 from poettering/dissect-moar
dissect: add dissection policies
2023-04-12 13:46:08 +02:00
Lennart Poettering
75b29fda71 service: tell service processes that the fdstore is available via an env var 2023-04-12 10:34:31 +02:00
Zbigniew Jędrzejewski-Szmek
ba5a469648
Merge pull request #27169 from yuwata/udev-rule-refuse-unsafe-path
sd-device,udev: refuse unsafe path in SYMLINK= and TAG=
2023-04-11 14:43:50 +02:00
Luca Boccassi
1dec1c6163
Merge pull request #27182 from mrc0mmand/test-tweaks
test: a couple of stability tweaks
2023-04-10 18:42:34 +01:00
Yu Watanabe
32cc2cfac9 test: add another regression test
For #27187, which should be also caused by #26956.
2023-04-10 05:43:09 +09:00
Yu Watanabe
1538136911 test: systemd-analyze blame should succeed now 2023-04-10 05:34:30 +09:00
Frantisek Sumsal
9acb7ee425 test: check if we skip the full setup on daemon-reexec (again)
My original assumption in 61961e693d was wrong, since we do reset
/dev/console during reexec (see make_console_stdio()), so the test was
quite racy. Let's replace it with something, hopefully, more reliable.

Follow-up to 61961e693d.
2023-04-08 13:55:29 +09:00
Yu Watanabe
18a6cd4ba3 test-64: add tests for compat devlinks for NVMe drive 2023-04-08 06:12:29 +09:00
Frantisek Sumsal
cb58571a11 test: bump the timeout for non-qemu runs to 90s
When Ubuntu CI is oversaturated, 60s doesn't seem to be enough.
2023-04-07 17:23:59 +02:00
Frantisek Sumsal
6de6376075 test: enable the systemd-resolved unit in TEST-75
Without enabling itx, there's no symlink to the org.freedesktop.resolve1
dbus service, so there exists a tiny window in which the sequence of
`systemctl start` and `systemctl service-log-level` commands might fail:

[ 1127.615151] H systemd[1]: Started Network Name Resolution.
[ 1127.617768] H testsuite-75.sh[34]: + systemctl service-log-level systemd-resolved.service debug
[ 1127.621251] H dbus-daemon[54]: [system] Activating via systemd: service name='org.freedesktop.resolve1' unit='dbus-org.freedesktop.resolve1.service' requested by ':1.24' (uid=0 pid=119 comm="systemctl service-log-level systemd-resolved>
[ 1127.621336] H systemd[1]: dbus-org.freedesktop.resolve1.service: Failed to load configuration: No such file or directory
[ 1127.621364] H systemd[1]: dbus-org.freedesktop.resolve1.service: Trying to enqueue job dbus-org.freedesktop.resolve1.service/start/replace
[ 1127.621395] H systemd[1]: D-Bus activation failed for dbus-org.freedesktop.resolve1.service: Unit dbus-org.freedesktop.resolve1.service not found.
[ 1127.621965] H dbus-daemon[54]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found.
[ 1127.622046] H systemd[1]: systemd-resolved.service: D-Bus name org.freedesktop.resolve1 now owned by :1.25
[ 1127.622130] H systemctl[119]: Failed to set log level of org.freedesktop.resolve1 to debug: Unit dbus-org.freedesktop.resolve1.service not found.

Spotted in a couple of recent Ubuntu CI runs.
2023-04-07 17:00:10 +02:00
Zbigniew Jędrzejewski-Szmek
1e094cb4ba
Merge pull request #27126 from yuwata/journal-compress
sd-journal: allow to specify compression algorithm through env
2023-04-07 09:28:27 +02:00
Yu Watanabe
0864b5eb6e
Merge pull request #27158 from mrc0mmand/more-tests
test: introduce TEST-81-GENERATORS
2023-04-07 07:53:37 +09:00
Frantisek Sumsal
61961e693d test: check if we skip the full setup on daemon-reexec
A simple test case for issue #27106.

Resolves: #27139
2023-04-07 07:53:14 +09:00
Yu Watanabe
d23a1c52a9 test: add test case that journal file is created with the requested compression algorithm 2023-04-07 02:30:43 +09:00