1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-03 17:47:28 +03:00

3460 Commits

Author SHA1 Message Date
Yu Watanabe
cb6ff2a42c
Merge pull request #26771 from YHNdnzj/machinectl-edit
machinectl: add verb edit and cat to operate on .nspawn files
2023-03-16 04:02:11 +09:00
Dmitry V. Levin
f5b28e6bd8 test: fix testsuite-17.10.sh
Make sure /etc/udev/hwdb.d/ exists before creating a file inside it.

Fixes: 95cf8cae77f7 ("test: add coverage test for udevadm")
2023-03-16 03:59:01 +09:00
Dmitry V. Levin
3ec58d0cd8 udev-rules: check for conflicting and duplicate expressions
Log an error when a rule line contains conflicting match expressions, e.g.
  NAME=="value", NAME!="value"

Log a warning when a rule line contains duplicate expressions, e.g.
  NAME=="value", NAME=="value"
2023-03-16 03:49:57 +09:00
Mike Yuan
af0292844d
test: add testsuite-74.machinectl 2023-03-15 19:56:19 +08:00
Luca Boccassi
1be50af42e
Merge pull request #26804 from fbuihuu/fixes-for-test-58-repart
Fixes for test 58 repart
2023-03-15 10:56:07 +00:00
Luca Boccassi
d4b6ec980d core: make the memory pressure cgroup path writable when ProtectControlGroups=yes
The interface requires services to write to the cgroup file to activate notifications,
but with ProtectControlGroups=yes we make it read-only. Add a writable bind mount.

Follow-up for 6bb0084204bd93122c9f04391b80aea5a8a0ff08
2023-03-15 09:23:17 +01:00
Franck Bui
693c3e1a59 test: assume run-unit-tests.py and unit tests are installed in the same directory
This avoids hard coding the path of the directory where the unit tests are
installed.
2023-03-15 09:19:33 +01:00
Daan De Meyer
3a36d19938
Merge pull request #26662 from yuwata/test-execute-network-namespace-path
test-execute: add tests for NetworkNamespacePath=
2023-03-14 11:16:15 +01:00
Franck Bui
1b971e0117 tests: don't use absolute paths when installing binaries in TEST-58-REPART
Let image_install figures the binary paths out itself as not all distributions
ship the mkfs.* tools in the same location. For example openSUSE ships
mksquashfs in /usr/bin/.
2023-03-14 10:11:27 +01:00
Franck Bui
8fd25ba343 tests: fix inverted condition in testsuite-58.sh 2023-03-14 10:07:06 +01:00
Mike Yuan
880adc6edd test: testsuite-26: remove duplicate source 2023-03-14 12:32:16 +09:00
Yu Watanabe
4fed028ae4
Merge pull request #26781 from mrc0mmand/tests-again
test: add a couple of tests for systemd-path
2023-03-14 03:27:45 +09:00
Yu Watanabe
d77d42ed3a systemctl: refuse to acquire dbus connection with --global
Maybe, better to check the runtime scope each verb for better log
message, but this is a good start point to not trigger assertion.

Fixes oss-fuzz#56915 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56915).

Fixes #26402 and #26754.
2023-03-13 12:27:34 +01:00
Frantisek Sumsal
8093693275 test: add a couple of tests for systemd-path 2023-03-13 11:59:18 +01:00
Yu Watanabe
c9501b03cd
Merge pull request #26641 from medhefgo/boot-elf2efi
boot: Drop gnu-efi / Add elf2efi.py
2023-03-11 17:15:01 +09:00
Dmitry V. Levin
b2f7bb760a udev_rules_parse_file: issue diagnostics about duplicate LABEL tokens
When a rules contains several LABEL tokens, the parser used to silently
discard all of them besides the last one without any diagnostics at all.
It's time to break the vow of silence and let the parser issue a warning.
2023-03-10 17:10:41 +00:00
Dmitry V. Levin
c8f39ddcf6 testsuite-17.11.sh: check udevadm verify --root 2023-03-10 17:10:41 +00:00
Dmitry V. Levin
e8c53080c4 udevadm verify: load all rules from the system if no rules were given
When udevadm verify is invoked without positional arguments, that is,
when no udev rules files are specified, load all rules files from the system
like the udev daemon does, and verify them.
2023-03-10 17:10:41 +00:00
Dmitry V. Levin
197f695a75 testsuite-17.11.sh: prepare to test udevadm verify --root 2023-03-10 17:10:41 +00:00
Dmitry V. Levin
99f2445171 testsuite-17.11.sh: create all files in a temporary directory
Make sure the test would not collide with anything else by moving
all files it created into a temporary directory.
2023-03-10 17:10:41 +00:00
Dmitry V. Levin
0b1ee3e311 testsuite-17.11.sh: robustify unknown user/group checks
Use certainly invalid user/group names in the tests that check
unknown user/group diagnostics.
2023-03-10 17:10:41 +00:00
Luca Boccassi
5c67a8a188 test: run script from /tmp, not /run
On Debian the test fails because /run is noexec. Simply create the
script in /tmp (and use a BindPath=), as other tests are doing.

Follow-up for 3b7101183cac4b35a8bd6ea2c1de9260c33f977f
2023-03-10 11:01:22 +00:00
Jan Janssen
e8509329d7 ci: Adjust for new EFI build 2023-03-10 11:41:08 +01:00
Jan Janssen
dfca5587cf tree-wide: Drop gnu-efi
This drops all mentions of gnu-efi and its manual build machinery. A
future commit will bring bootloader builds back. A new bootloader meson
option is now used to control whether to build sd-boot and its userspace
tooling.
2023-03-10 11:41:03 +01:00
Lennart Poettering
862481ece0
Merge pull request #26693 from poettering/udev-loop-links
udev: add /dev/loop/by-inode/… + /dev/loop/by-ref/… loopback block device symlinks
2023-03-10 09:34:31 +01:00
Luca Boccassi
28f3cbbded
Merge pull request #26734 from mrc0mmand/test-followups
Assorted test tweaks
2023-03-10 00:03:48 +00:00
Luca Boccassi
d56391b40f
Merge pull request #26731 from yuwata/mempressure-follow-ups
Mempressure follow ups
2023-03-09 22:35:29 +00:00
Lennart Poettering
a617007417 mempress: change default PSI window duration to 2s
This changes the PSI window duration we default to for watching memory
pressure events from 1s to 2s. This is because apparently the kernel
will soon disallow window durations other than 2s for unprivileged
processes.

Hence, we'll bump the threshold from 100m to 200ms, and the window from
1s to 2s.
2023-03-09 22:31:20 +01:00
Lennart Poettering
f5e46b9e09 test: test new systemd-dissect --attach/--detach/--loop-ref= and /dev/loop/* symlinks
Let's test that everything we just added works in combination.
2023-03-09 22:29:11 +01:00
Frantisek Sumsal
4af346a8d8 test: exercise JSON transformations in busctl 2023-03-09 16:33:08 +01:00
Yu Watanabe
054749e413 core: add missing MemoryPressureWatch= and MemoryPressureThresholdSec= setting
Follow-up for #26393.

Addresses https://github.com/systemd/systemd/pull/26393#issuecomment-1458655798.
2023-03-09 23:43:04 +09:00
Frantisek Sumsal
715b4c26dc test: fall back to /sys/fs/cgroup/systemd if necessary
Necessary for some CI setups where we boot an nspawn container on a host
with older systemd with legacy hierarchy, so systemd mounts its stuff
under /sys/fs/cgroup/systemd.
2023-03-09 15:27:48 +01:00
Frantisek Sumsal
b3ba7d6274 test: force mkfs.btrfs to overwrite any existing file systems
mkfs.btrfs (unlike mkfs.ext4) checks if the target already contains
a file system and refuses to continue if so. This causes spurious fails
in case the random garbage on the temporary device matches a valid FS
header:

[   19.723806] testsuite-64.sh[355]: + udevadm lock --device=/dev/mapper/encbtrfs0 --device=/dev/mapper/encbtrfs1 --device=/dev/mapper/encbtrfs2 --device=/dev/mapper/encbtrfs3 mkfs.btrfs -M -d raid1 -m raid1 -L btrfs_mencdisk -U deadbeef-dead-dead-beef-000000000003 /dev/mapper/encbtrfs0 /dev/mapper/encbtrfs1 /dev/mapper/encbtrfs2 /dev/mapper/encbtrfs3
[   19.918934] testsuite-64.sh[2494]: ERROR: /dev/mapper/encbtrfs0 appears to contain an existing filesystem (hfsplus)
[   19.920490] testsuite-64.sh[2494]: ERROR: use the -f option to force overwrite of /dev/mapper/encbtrfs0

Let's force mkfs.btrfs to overwrite the file system in such case.
2023-03-09 13:50:15 +01:00
Frantisek Sumsal
cca295ab7a test: don't fail if we can't remove the scsi_debug module
Let's make the cleanup 'best effort' operation, as sometimes we might
not be able to remove the scsi_debug module, and we don't really care
if it stays loaded:

[   88.521333] testsuite-17.sh[1827]: ID_TEST=test
[   88.522015] testsuite-17.sh[1679]: + rmmod scsi_debug
[   88.524795] testsuite-17.sh[1828]: rmmod: ERROR: Module scsi_debug is in use
[   88.527786] testsuite-17.sh[1679]: + cleanup_17_10
2023-03-09 13:32:56 +01:00
Frantisek Sumsal
72f6d0e556 test: bump the D-Bus related timeouts to 120s
Let's attempt to reduce the amount of flakes further when the AWS region
we run in is under heavy load and the hypervisor stars stealing our CPU
time.

Follow-up to e0cbb73911 and c78d18215b.
2023-03-09 13:27:57 +01:00
Frantisek Sumsal
15eda898af test: ignore busctl tree fails
As the test runs during machine bootup where jobs run in parallel,
busctl might attempt to introspect a job that already finished and fail.
Since in this case we're more interested in crashes/leaks, let's ignore
the exit code.

Follow-up to 16600a8661.
2023-03-09 11:34:14 +01:00
Zbigniew Jędrzejewski-Szmek
ba0e70673c
Merge pull request #26038 from lilyinstarlight/fix/fstab-generator-sysroot-without-cmdline
fstab-generator: use correct targets when /sysroot is specificied in fstab only
2023-03-09 08:51:31 +01:00
Dmitry V. Levin
b27e5e2aca udev_rules_parse_file: issue diagnostics about line continuation at EOF
When udev rules file ends with a line continuation, the parser
used to silently ignore the line without any diagnostics at all.
It's time to break the vow of silence and let the parser issue some
error diagnostics.
2023-03-08 18:55:40 +00:00
Dmitry V. Levin
5040401b43 test: check udevadm verify diagnostics of unused labels 2023-03-08 18:55:40 +00:00
Dmitry V. Levin
45183cdd6d test: add a test for udevadm verify 2023-03-08 18:55:40 +00:00
Frantisek Sumsal
bb076d77f4 test: add a couple of tests for systemd-id128 2023-03-08 16:28:37 +01:00
Frantisek Sumsal
c38cad7aea test: add a couple of tests for systemd-escape 2023-03-08 16:28:37 +01:00
Frantisek Sumsal
16600a8661 test: add a couple of tests for busctl 2023-03-08 12:53:44 +09:00
Lennart Poettering
4601243375 test: add test for new /sbin/mount.ddi helper 2023-03-06 22:54:52 +01:00
Yu Watanabe
25e12db5e4
Merge pull request #26650 from yuwata/udev-trigger
test: generate debugging logs for udevd after restart
2023-03-06 16:36:34 +09:00
Yu Watanabe
600ed5c242 test-execute: add test for NetworkNamespacePath=
Prompted by https://github.com/systemd/systemd/issues/26422#issuecomment-1435772839.
2023-03-04 02:50:15 +09:00
Yu Watanabe
c9a2563225 test-execute: simplify the tests for PrivateNetwork=
If an exotic network driver is loaded, there may exist an unexpected
network interface.
2023-03-04 02:49:13 +09:00
Yu Watanabe
af766bb844 test: trigger new events after all currently queued events are processed
Otherwise, udevd may be busy and udevadm may not receive the reply
for the control packet within the time limit.
2023-03-03 23:25:01 +09:00
Lennart Poettering
16a9ad557d
Merge pull request #26355 from poettering/journal-no-rtc
journald: support ordering journal entries by boot ID if no RTC is available
2023-03-03 13:13:13 +01:00
Yu Watanabe
b6b5135e66 test: generate debugging logs for udevd after restart 2023-03-03 19:48:40 +09:00