Commit Graph

3470 Commits

Author SHA1 Message Date
Dmitry V. Levin
f0a16c9ae8 udev-rules: add another check for conflicting expressions
Log an error when a rule line contains the following kind of conflicting
match expressions:

  KEY=="foo", KEY=="bar"
2023-03-21 09:34:50 +09:00
Dmitry V. Levin
5004aa84ac udev-rules: fix check for conflicting and duplicate expressions
Fix check for conflicting and duplicate expressions of types that
support alternative patterns.

Fixes: 3ec58d0cd8 ("udev-rules: check for conflicting and duplicate expressions")
2023-03-19 11:32:09 +00:00
Yu Watanabe
458e8d6dd0 test-systemd-tmpfiles.py: create global temporary directory
For some unknown reasons, the temporary directory created by the test
below is not removed:
```
 # Test the case that a valid symlink is in the path.
 label = 'valid_symlink-deep'
 test_content('f= {} - - - - ' + label, label, user=user, subpath='/deep/1/2', path_cb=valid_symlink)
```
To keep /tmp clean, let's create the global temprary directory.
2023-03-18 22:27:41 +09:00
Yu Watanabe
015ddd4bf0 test-systemd-tmpfiles.py: use test_content() at one more place 2023-03-18 22:27:41 +09:00
Daan De Meyer
6742397921 Merge pull request #26783 from yuwata/loop-ref-follow-up
udev: slightly extend comment and add more tests
2023-03-17 10:00:43 +01:00
Yu Watanabe
77c6bb895a Merge pull request #26803 from yuwata/udevadm-verify-summary
udevadm-verify: print a short summary
2023-03-17 12:14:04 +09:00
Frantisek Sumsal
e912bef85d test: wrap mkfs.*/mksquashfs/mkswap binaries when running w/ ASan 2023-03-16 12:56:40 +00:00
Yu Watanabe
7b4cae904b test: add tests for summary output of udevadm verify 2023-03-16 14:54:46 +09:00
Yu Watanabe
f99deb1e94 test: reindent testsuite-17.11.sh 2023-03-16 14:54:46 +09:00
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: 95cf8cae77 ("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 6bb0084204
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
Yu Watanabe
91ea97356c test-50-dissect: add test for long reference name 2023-03-14 18:53:55 +09: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