1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
Commit Graph

3365 Commits

Author SHA1 Message Date
Yu Watanabe
8586e8ab84
Merge pull request #26324 from yuwata/argv-util-update-short-name
argv-util: also update short invocation name
2023-02-07 12:08:07 +09:00
Yu Watanabe
577a0fd59b test: use notice log level to make easily filter out logs from PID1 2023-02-06 22:50:03 +09:00
Zbigniew Jędrzejewski-Szmek
7a17e41dcf test: drop whitespace after shell redirection operators
(The one case that is left unchanged is '< <(subcommand)'.)

This way, the style with no gap was already dominant. This way, the reader
immediately knows that ' < ' is a comparison operator and ' << ' is a shift.

In a few cases, replace custom EOF replacement by just EOF. There is no point
in using someting like "_EOL" unless "EOF" appears in the text.
2023-02-06 09:19:04 +01:00
Luca Boccassi
9a101c5d4c
Merge pull request #26269 from keszybz/sysusers-empty-etc-and-improved-messages
sysusers: improve messages and autocreate /etc
2023-02-01 23:14:59 +00:00
Luca Boccassi
e5cf396181
Merge pull request #26287 from medhefgo/mkosi-auto-enroll
ci: Test with secure boot enabled under mkosi
2023-02-01 21:51:04 +00:00
Frantisek Sumsal
cc3826155d
Merge pull request #26285 from yuwata/test-lvextend
test: add a testcase for lvextend
2023-02-01 20:59:04 +00:00
Zbigniew Jędrzejewski-Szmek
92fc007902
Merge pull request #26219 from yuwata/localed-follow-ups
locale: check conversion before polkit
2023-02-01 17:18:35 +01:00
Jan Janssen
2de6cc18f9 ci: Test with secure boot enabled under mkosi
This gives us some nice test coverage for secure boot enrolling and the
stub secure boot workound. The authenticated EFI variables are already
created by mkosi, all we need to do is request secure boot to be used.
2023-02-01 17:16:03 +01:00
Yu Watanabe
d60e348261 test: add a testcase for lvextend
For RHBZ#2158628 (https://bugzilla.redhat.com/show_bug.cgi?id=2158628)
2023-02-02 00:40:57 +09:00
Yu Watanabe
5479d0f83a test: make helper_check_device_units() log unit name 2023-02-01 23:04:13 +09:00
Zbigniew Jędrzejewski-Szmek
3e74e6a15b test-sysusers: check that sysusers creates /etc when missing 2023-02-01 11:38:35 +01:00
Lennart Poettering
e9125200ac
Merge pull request #26245 from ldv-alt/tmpfiles-fixes
tmpfiles: fix specifier expansion in arguments of C and L lines
2023-01-30 17:14:03 +01:00
Yu Watanabe
808f7c94f0
Merge pull request #23956 from mrc0mmand/resolved-ipv6
test: cover (not only) IPv6 in the resolved test suite
2023-01-30 19:21:19 +09:00
Daan De Meyer
60f42f7ec2 test-systemd-tmpfiles: Fix execution when user is not in /etc/passwd
We might be running in a chroot as a uid that doesn't exist in /etc/passwd.
Let's make sure we don't fail in this scenario.

We pass $HOME when resetting the env so that we can find a home directory
and skip tests that depend on user name/group.
2023-01-29 17:49:38 +00:00
Yu Watanabe
21a9c92625 test: add tests for localectl --no-convert 2023-01-28 15:06:00 +09:00
Frantisek Sumsal
42262f3e1b test: wrap delv & dig when running with sanitizers
On Arch both delv and dig pull in libnss_resolve:

```
$ grep resolve /etc/nsswitch.conf
hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
```
2023-01-27 16:40:52 +01:00
Frantisek Sumsal
270e9dcdb8 test: don't hang indefinitely on no match 2023-01-27 15:45:00 +01:00
Frantisek Sumsal
05bb428952 test: add a test for the OPENPGPKEY RR 2023-01-27 15:45:00 +01:00
Frantisek Sumsal
3095bd2cca test: add a couple of SRV records to check service resolution 2023-01-27 15:45:00 +01:00
Frantisek Sumsal
5c9111fe77 test: cover IPv6 in the resolved test suite 2023-01-27 15:45:00 +01:00
Daan De Meyer
2ecc7a5bca repart: Add roothash to output of all verity siblings
This can be used to match verity partitions together using the repart
JSON output.
2023-01-25 19:50:44 +00:00
Michael Biebl
d173c9ebb0 test: skip firstboot --prompt-keymap check if keymaps are missing
Fixes: #26165
2023-01-25 19:46:33 +00:00
Luca Boccassi
1fd579061a locale: rename new XKB variables to match Debian/Ubuntu's
Debian/Ubuntu use almost the same variables, but without '_'. Given
our usage is new, rename them so that they match and downstream tech
debt can be removed.

Follow-up for https://github.com/systemd/systemd/pull/25805

See:
 https://github.com/systemd/systemd/issues/24228
 https://github.com/systemd/systemd/pull/25412
2023-01-24 22:09:58 +01:00
Frantisek Sumsal
b0c110967b
Merge pull request #26164 from mrc0mmand/test-bus-timeout
test: bump the client-side timeout in sd-bus as well
2023-01-24 08:49:29 +00:00
Zbigniew Jędrzejewski-Szmek
d4fc020996
Merge pull request #26153 from DaanDeMeyer/repart-remove-userns
mkfs-util: Remove user namespace owner => root mapping
2023-01-23 21:46:55 +01:00
Luca Boccassi
020b2e41ea core: ensure init.scope is realized after drop-ins have been loaded
If we add a drop-in for init.scope (e.g.: to set some memory limit),
it will be loaded long after the cgroup has already been realized.
Do it again when creating the special unit.
2023-01-23 21:40:54 +01:00
Luca Boccassi
deeebc95af
Merge pull request #25805 from yuwata/locale-xkb-save-vconsole
locale: also save X11 keyboard settings to /etc/vconsole.conf
2023-01-23 19:40:12 +00:00
Frantisek Sumsal
d932022ddf test: bump the container spawn timeout to 60s
As 30s might be not enough on busy systems (and we already bumped the
reboot timeout from 30s to 60s for this reason).
2023-01-23 19:13:49 +01:00
Frantisek Sumsal
e0cbb73911 test: bump the client-side timeout in sd-bus as well
Since c78d18215b D-Bus services now have 60s to start, but the client
side (sd-bus) still waits only for 25s before giving up:

```
[  226.196380] testsuite-71.sh[556]: + assert_in 'Static hostname: H' ''
[  226.332965] testsuite-71.sh[576]: + set +ex
[  226.332965] testsuite-71.sh[576]: FAIL: 'Static hostname: H' not found in:
[  228.910782] sh[577]: + systemctl poweroff --no-block
[  232.255584] hostnamectl[565]: Failed to query system properties: Connection timed out
[  236.827514] systemd[1]: end.service: Consumed 2.131s CPU time.
[  237.476969] dbus-daemon[566]: [system] Successfully activated service 'org.freedesktop.hostname1'
[  237.516308] systemd[1]: system-modprobe.slice: Consumed 1.533s CPU time.
[  237.794635] systemd[1]: testsuite-71.service: Main process exited, code=exited, status=1/FAILURE
[  237.818469] systemd[1]: testsuite-71.service: Failed with result 'exit-code'.
[  237.931415] systemd[1]: Failed to start testsuite-71.service.
[  238.000833] systemd[1]: testsuite-71.service: Consumed 5.651s CPU time.
[  238.181030] systemd[1]: Reached target testsuite.target.
```

Let's override the timeout in sd-bus as well to mitigate this.

Follow-up to c78d18215b.
2023-01-23 18:44:55 +01:00
Daan De Meyer
ff1b55ffdf Revert "repart: Ensure files end up owned by root in generated filesystems"
This reverts commit e59678b2cf.

We also modify the repart integration tests to make them pass with the
changes in this commit. In short, we have to make sure every file is
owned by the user executing repart. We use tee instead of cat since it
makes that easier. This also has the benefit of improving debugability
as seeing the config file contents on stdout makes it easier to know
which test is failing.
2023-01-23 16:33:03 +01:00
Zbigniew Jędrzejewski-Szmek
e830d6dd2d
Merge pull request #25145 from yuwata/udevadm-trigger
udev: make 'udevadm trigger --settle' work even if device is renamed
2023-01-23 13:49:20 +01:00
Michael Biebl
a4bc35740a test: fix TEST-73-LOCALE on Debian
Fix incorrection assumption about the Debian patch being buggy and
actually making TEST-73-LOCALE fail on Debian.

```
 # localectl set-locale LANG=C.UTF-8
 # cat /etc/default/locale
 LANG=C.UTF-8
```
2023-01-23 11:41:14 +00:00
Yu Watanabe
8589823f9d locale: also save XKB settings to vconsole.conf
Closes #24228.
Replaces #25412.
2023-01-23 11:30:03 +00:00
Luca Boccassi
a98d69f0af
Merge pull request #26105 from yuwata/network-config-parse-address-make-prefix-length-full
network: make config_parse_address() assume full prefix length
2023-01-19 21:06:08 +00:00
Jelle van der Waa
ad8858c1f7 hostnamed: expose FirmwareDate as timestamp in dbus
Offer the firmware date as an epoch instead of the literal DMI string.

Closes #25679
2023-01-19 21:57:06 +01:00
Yu Watanabe
e5e0743189 network: assume prefix length is full address size
The commit 0f707207b9 enables strong
warning about missing prefix length in Address= setting.
The change was done in v241, and was about 4 years ago.
Let's drop the legacy assumption and make the parser consistent with
'ip address' command.

C.f. #11307.
Closes #26102.
2023-01-19 22:09:10 +09:00
Frantisek Sumsal
48e582d7fe test: update Ubuntu CI docs 2023-01-19 13:54:31 +01:00
Yu Watanabe
a93cc5d911 test-network: drop unused file 2023-01-19 21:22:22 +09:00
Yu Watanabe
ff4d2a09fd test: use 'udevadm trigger --settle' even if device is renamed 2023-01-19 17:58:05 +09:00
Daan De Meyer
78d774bab4 testsuite-77: Fix race condition
Use a socket unit to make sure the socket exists before we start
the client that accesses it.
2023-01-19 02:11:41 +00:00
joshuazivkovic
a23be57de3 systemd-analyze: Add --json=, --table and -no-legend tests for plot 2023-01-18 14:33:08 +00:00
Yu Watanabe
df0a741cdd test-network: reprocess the loopback network interface
Fixes the issue reported at https://github.com/systemd/systemd-centos-ci/pull/585#issuecomment-1385537641.
2023-01-18 14:08:14 +00:00
Luca Boccassi
e0e7bc8223 core: add GetUnitByPIDFD method and use it in systemctl
A pid can be recycled, but a pidfd is pinned. Add a new method that is safer
as it takes a pidfd as input.
Return not only the D-Bus object path, but also the unit id and the last
recorded invocation id, as they are both useful (especially the id, as
converting from a path object to a unit id from a script requires another
round-trip via D-Bus).

Note that the manager still tracks processes by pid, so theorethically this
is not fully error-proof, but on the other hand the method response is
synchronous and the manager is single-threaded, so once a call is being
processed the unit database will not change anyway. Once the manager
switches to use pidfds everywhere, this can be further hardened.
2023-01-18 10:58:46 +01:00
Frantisek Sumsal
c78d18215b test: bump D-Bus service start timeout if we run without accel
The default (25s) doesn't seem to be enough in some cases (especially
in VMs without acceleration), causing spurious timeouts:

[  174.297658] dbus-daemon[647]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.0' (uid=0 pid=645 comm="hostnamectl " label="kernel")
[  184.202313] systemd[1]: systemd-update-utmp-runlevel.service: Consumed 1.253s CPU time.
[  197.335422] systemd[1]: Started dbus.service.
[  199.211468] testsuite-71.sh[639]: + assert_in 'Static hostname: H' ''
[  199.347192] dbus-daemon[647]: [system] Failed to activate service 'org.freedesktop.hostname1': timed out (service_start_timeout=25000ms)
[  199.394879] testsuite-71.sh[657]: + set +ex
[  199.438918] testsuite-71.sh[657]: FAIL: 'Static hostname: H' not found in:
[  200.966006] systemd-logind[631]: Watching system buttons on /dev/input/event0 (Power Button)
[  201.008178] systemd-logind[631]: Watching system buttons on /dev/input/event1 (AT Translated Set 2 keyboard)
[  201.034106] systemd-logind[631]: New seat seat0.
[  201.238267] sh[658]: + systemctl poweroff --no-block
[  201.329890] systemd[1]: Starting systemd-hostnamed.service...
[  202.156622] systemd[1]: systemd-update-utmp-runlevel.service: Deactivated successfully.
[  204.818913] hostnamectl[645]: Failed to query system properties: Connection timed out
[  205.195583] systemd[1]: testsuite-71.service: Main process exited, code=exited, status=1/FAILURE
[  205.227237] systemd[1]: testsuite-71.service: Failed with result 'exit-code'.
[  205.712780] systemd[1]: Failed to start testsuite-71.service.
2023-01-17 23:09:34 +00:00
Luca Boccassi
2cd1e475dd
Merge pull request #26081 from yuwata/udev-symlink-remove
udev: support -= operator for SYMLINK
2023-01-17 21:59:12 +00:00
Lennart Poettering
f44ed151c6 test: add simple integration test for checking PCR extension works as it should 2023-01-17 09:42:16 +01:00
Yu Watanabe
d314345a34 test-udev: add a brief test for -= operator for SYMLINK 2023-01-17 14:39:42 +09:00
Luca Boccassi
9e6b820e8d
Merge pull request #26051 from YHNdnzj/systemctl-list-dependencies-type
systemctl: list-dependencies: support --type= and --state=
2023-01-16 19:38:58 +00:00
Mike Yuan
3729976944
systemctl: list-dependencies: support --type= and --state=
Closes #25975
2023-01-16 19:46:52 +08:00
Frantisek Sumsal
fc2a0bc05e test: support a non-default SysV directory
Since the directory is configurable via -Dsysvinit-path= during build,
it makes the test fail on Fedora/RHEL/CentOS, where it's set to
/etc/rc.d/init.d, instead of the default /etc/init.d. Since we can't get
the value at runtime (in a reasonable manner), let's just support the
two most common paths for now.

Follow up to 7fcf0fab07.
2023-01-14 09:50:43 +09:00