Yu Watanabe
577a0fd59b
test: use notice log level to make easily filter out logs from PID1
2023-02-06 22:50:03 +09: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
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
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
21a9c92625
test: add tests for localectl --no-convert
2023-01-28 15:06:00 +09: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
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
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
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
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
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
Lennart Poettering
f44ed151c6
test: add simple integration test for checking PCR extension works as it should
2023-01-17 09:42:16 +01: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
Frantisek Sumsal
7fcf0fab07
test: explicitly create the /etc/init.d directory
...
On RHEL/CentOS/Fedora this directory is provided by the chkconfig or
initscripts package, which might not be installed:
testsuite-26.sh[1225]: + [[ -x /usr/lib/systemd/system-generators/systemd-sysv-generator ]]
testsuite-26.sh[1225]: + cat
testsuite-26.sh[2330]: /usr/lib/systemd/tests/testdata/units/testsuite-26.sh: line 299: /etc/init.d/issue-24990: No such file or directory
Follow-up to 5f882cc3ab .
2023-01-13 10:48:40 +09:00
Lennart Poettering
ee52bbc68f
test: add Type=notify-reload testcase
2023-01-10 18:28:38 +01:00
Richard Phibel
cd48e23f6a
core: add OpenFile setting
2023-01-10 15:16:26 +01:00
Yu Watanabe
2d0d75b279
test: add tests for failure in renaming network interface
2023-01-10 14:25:20 +09:00
Lennart Poettering
d0242ac946
format-table: add field type TABLE_PATH_BASENAME
...
This is just like TABLE_PATH, but only shows the basename in regular
tabular output.
This is useful in systemd-repart for example
2022-12-23 17:35:21 +01:00
Luca Boccassi
896785a7d9
Merge pull request #25387 from yuwata/core-fix-gc-logic
...
core: fix logic of merging units
2022-12-17 14:49:21 +01:00
наб
209d355c70
Add basic systemctl edit test
2022-12-17 14:47:38 +01:00
Yu Watanabe
ea4b8f4cbf
test: systemd-mount --list and systemd-umount requires the device is initialized by udevd
...
Fixes #25674 .
2022-12-16 15:14:42 +09:00
Yu Watanabe
ad48ff12bd
test: show and check almost all journal entries since the relevant command being invoked
...
For some reasons, journal timestamps from other sources sometimes
inconsistent. For example,
```
$ journalctl --file system.journal -o short-monotonic -u resmontest.service
[ 1112.168109] ns1.unsigned.test resolvectl[419]: → Q: ns1.unsigned.test IN AAAA
[ 1112.168109] ns1.unsigned.test resolvectl[419]: ← S: success
[ 1112.168109] ns1.unsigned.test resolvectl[419]: → Q: ns1.unsigned.test IN A
[ 1112.168109] ns1.unsigned.test resolvectl[419]: ← S: success
[ 1112.168109] ns1.unsigned.test resolvectl[419]: ← A: ns1.unsigned.test IN A 10.0.0.1
[ 1112.171961] ns1.unsigned.test systemd[1]: resmontest.service: Failed to load configuration: No such file or directory
[ 1112.172223] ns1.unsigned.test systemd[1]: resmontest.service: Trying to enqueue job resmontest.service/start/fail
[ 1112.179866] ns1.unsigned.test systemd[1]: resmontest.service: Installed new job resmontest.service/start as 312
[ 1112.179894] ns1.unsigned.test systemd[1]: resmontest.service: Enqueued job resmontest.service/start as 312
[ 1112.180389] ns1.unsigned.test systemd[1]: resmontest.service: Will spawn child (service_enter_start): /usr/bin/resolvectl
[ 1112.180418] ns1.unsigned.test systemd[1]: resmontest.service: Passing 0 fds to service
[ 1112.180447] ns1.unsigned.test systemd[1]: resmontest.service: About to execute /usr/bin/resolvectl monitor
[ 1112.180477] ns1.unsigned.test systemd[1]: resmontest.service: Forked /usr/bin/resolvectl as 419
[ 1112.180619] ns1.unsigned.test systemd[1]: resmontest.service: Changed dead -> start
[ 1112.180651] ns1.unsigned.test systemd[1]: Starting resmontest.service...
[ 1112.180799] ns1.unsigned.test systemd[419]: resmontest.service: Kernel keyring access prohibited, ignoring.
[ 1112.180895] ns1.unsigned.test systemd[419]: resmontest.service: Executing: /usr/bin/resolvectl monitor
[ 1112.181383] ns1.unsigned.test systemd[1]: resmontest.service: Got notification message from PID 419 (READY=1)
[ 1112.181413] ns1.unsigned.test systemd[1]: resmontest.service: Changed start -> running
[ 1112.181441] ns1.unsigned.test systemd[1]: resmontest.service: Job 312 resmontest.service/start finished, result=done
[ 1112.181469] ns1.unsigned.test systemd[1]: Started resmontest.service.
```
In such case, `journalctl -f` may not show the entries what we are interested in.
Fixes #25749 . (At least, workarond for the issue.)
2022-12-16 03:43:38 +09:00
Yu Watanabe
0b92fbbaee
test: fix typo
2022-12-16 01:38:08 +09:00
Yu Watanabe
9b8eb412ca
Merge pull request #25756 from yuwata/test-resolve-1
...
test: several cleanups for TEST-75-RESOLVE
2022-12-16 00:53:52 +09:00
Yu Watanabe
b3f1afc089
Merge pull request #24058 from qdeslandes/journald_regex_filtering
...
Allow for journald logs filtering on a per-unit basis
2022-12-15 22:03:33 +09:00
Yu Watanabe
133708b879
Revert "test: wait for the monitoring service to become active"
...
This reverts commit 5dd34c2604 .
`resolvectl monitor` sends notify event, and systemd-run wait for the
service being in active state. Hence, the loop is not necessary.
2022-12-15 21:50:13 +09:00
Yu Watanabe
ef09861a0b
test: suppress echo in monitor_check_rr()
2022-12-15 21:50:13 +09:00
Daan De Meyer
640c02d529
repart: Fix integration test
2022-12-15 21:48:30 +09:00
Lennart Poettering
6b41e0250f
test: add integration test for systemd-measure --append=
2022-12-15 11:40:21 +01:00
Quentin Deslandes
1c9c6fc7df
journal: add integration tests for log filtering
...
Add integration tests for journald's log filtering feature.
2022-12-15 09:57:39 +00:00
Yu Watanabe
62650f4258
Merge pull request #25602 from fbuihuu/fix-TEST-73-LOCALE
...
localed: reload PID1 configuration after modifying /etc/locale.conf
2022-12-15 17:47:05 +09:00
Luca Boccassi
e146136304
Merge pull request #25717 from bluca/reload
...
manager: log reload() sender and allow rate-limiting
2022-12-14 15:45:22 +01:00
Zbigniew Jędrzejewski-Szmek
357f5ccbf6
Merge pull request #25689 from YHNdnzj/systemctl-exit-code
...
systemctl: make is-* return EXIT_PROGRAM_OR_SERVICES_STATUS_UNKNOWN(4) when no unit file is found
2022-12-14 08:37:16 +01:00