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
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
Yu Watanabe
b6b5135e66
test: generate debugging logs for udevd after restart
2023-03-03 19:48:40 +09:00
Lennart Poettering
4601c7aa8f
test: add test for journals without RTC
...
This adds a test for checking we can safely order boot IDs via the
timestamp of their most recent known entry. It takes a set of journal
files (supplied by a user) and that are partially corrupted, and ensures
we get a clear, defined order of boot IDs out of it.
2023-03-02 10:18:24 +01:00
Frantisek Sumsal
90169eb92a
test: a couple of format-related tweaks
2023-03-01 17:53:55 +01:00
Frantisek Sumsal
ea91b45e0e
test: skip the hwdb update related tests w/ sanitizers and w/o accel
...
systemd-hwdb update is an expensive operation by itself, and when
running with sanitizers and in a VM without acceleration this cost is
exacerbated even further, making the test run for a very long time.
For example, in the daily CentOS CI ppc64le job with ASan+UBSan one
systemd-hwdb update takes more than 7 minutes; in the regular Arch job
with KVM it takes over 2 minutes.
Since the hwdb update is also tested in other places (like
TEST-01-BASIC and the test-hwdb meson test), let's skip it if we detect
we run with sanitizers and with plain QEMU.
2023-03-01 17:53:55 +01:00
Lennart Poettering
3b7101183c
test: add test for the new memory pressure unit file settings, and that they work
2023-03-01 09:43:24 +01:00
Lennart Poettering
d7fce219ae
test: test setting ambient caps via pam_systemd.so
2023-02-28 21:42:29 +01:00
David Tardon
95cf8cae77
test: add coverage test for udevadm
2023-02-27 07:22:20 +09:00
Luca Boccassi
f50535afad
analyze: add 'malloc' verb to dump malloc_info()
...
Gets the memory state of the manager:
root@image:~# systemd-analyze malloc
<malloc version=1>
<heap nr=0>
<sizes>
<size from=33 to=33 total=396 count=12/>
<unsorted from=20385 to=20385 total=20385 count=1/>
</sizes>
<total type=fast count=0 size=0/>
<total type=rest count=14 size=36589/>
<system type=current size=1691648/>
<system type=max size=1839104/>
<aspace type=total size=1691648/>
<aspace type=mprotect size=1691648/>
</heap>
<total type=fast count=0 size=0/>
<total type=rest count=14 size=36589/>
<total type=mmap count=0 size=0/>
<system type=current size=1691648/>
<system type=max size=1839104/>
<aspace type=total size=1691648/>
<aspace type=mprotect size=1691648/>
</malloc>
2023-02-23 18:59:06 +00:00
Frantisek Sumsal
6299b6e5e6
test: add coverage for #24177
...
Original issue: https://bugzilla.redhat.com/show_bug.cgi?id=1985288
2023-02-23 04:52:46 +09:00
Daan De Meyer
4d8ff4e868
repart: Exclude APIVFS mountpoint directories
...
Also exclude APIVFS and temporary files directories from the copy
operation so that these files don't accidentally end up in images.
2023-02-22 12:44:39 +01:00
Daan De Meyer
b63bd125d4
copy: Support both inode exclusion and contents exclusion
...
In some cases, we want to exclude a directory's contents but not
the directory itself. In other cases, we want to exclude a directory
and its contents. Let's extend the denylist logic in copy.h to support
both by changing the denylist from a set to hashmap so we can store the
deny type as the value.
We also modify the repart ExcludeFiles= option to make use of this. If
a directory to exclude ends with a "/", we'll only exclude its contents.
Otherwise, we'll exclude the full directory.
2023-02-22 12:44:36 +01:00
Yu Watanabe
a2e41b817b
test: add another stress test for devlink creation
2023-02-22 19:08:26 +09:00
Yu Watanabe
60c5bd7759
tree-wide: fix typo
2023-02-22 14:46:19 +09:00
Yu Watanabe
086234e39b
Merge pull request #26491 from dtardon/list-paths
...
Add systemctl list-paths
2023-02-22 09:29:54 +09:00
Yu Watanabe
a06f85a073
Merge pull request #26527 from mrc0mmand/more-tests
...
test: provide coverage for #26467 and #26483
2023-02-22 08:01:07 +09:00
Aidan Dang
d59025698f
Enable TPM by default with SetCredentialEncrypted
2023-02-21 21:07:02 +01:00
Frantisek Sumsal
adae3552f0
test: add coverage for #26483
2023-02-21 19:39:52 +01:00
Frantisek Sumsal
4190124b3c
test: add coverage for #26467
2023-02-21 19:39:52 +01:00
David Tardon
a2ceb88005
test: add a minimal test for list-paths
2023-02-21 19:03:26 +01:00
Yu Watanabe
53b3512f9c
Merge pull request #26499 from mrc0mmand/assorted-tweaks
...
A couple of test tweaks for recent CI fails
2023-02-21 05:55:37 +09:00
Daan De Meyer
0cd90cf4f3
Merge pull request #26437 from DaanDeMeyer/repart-exclude
...
repart: Add ExcludeFiles= option
2023-02-20 15:49:29 +01:00
Daan De Meyer
a9af827613
repart: Add ExcludeFiles= option
2023-02-20 13:51:46 +01:00
Frantisek Sumsal
27c814666f
test: disable pipefail when testing interactive firstboot
...
Otherwise we might get unexpected test fails due to SIGPIPE:
```
[ 14.334917] testsuite-74.sh[565]: + grep -q '^root:.*:0:0:.*:/bin/fooshell$' test-root/etc/passwd
[ 14.335670] testsuite-74.sh[681]: + systemd-firstboot --root=test-root --prompt-root-shell
[ 14.336382] testsuite-74.sh[680]: + echo -ne '\n/bin/barshell\n'
[ 14.336980] testsuite-74.sh[680]: .//usr/lib/systemd/tests/testdata/units/testsuite-74.firstboot.sh: line 166: echo: write error: Broken pipe
```
2023-02-20 10:48:32 +01:00
Lennart Poettering
dd131fcf8c
test: add test for new "systemctl --kill-value=" functionality
...
(as side-effect this also tests the new systemd-notify --exec switch)
2023-02-17 09:55:35 +01:00
Frantisek Sumsal
ca8b1d68c5
test: avoid matching other fields than __SEQNUM=
...
The current unanchored grep sometimes matches MESSAGE=/_CMDLINE= fields
that contain "__SEQNUM=" instead of just the __SEQNUM= field, causing
spurious test fails:
[ 721.546372] testsuite-04.sh[1013]: ++ cut -d= -f2
[ 721.555858] testsuite-04.sh[1011]: ++ journalctl -o export -n 1
[ 721.573037] testsuite-04.sh[1012]: ++ grep -a __SEQNUM=
[ 721.767294] testsuite-04.sh[562]: + SEQNUM1='495773
[ 721.769671] testsuite-04.sh[562]: ++ grep -a __SEQNUM
[ 721.771323] testsuite-04.sh[562]: grep -a __SEQNUM'
[ 721.772938] testsuite-04.sh[562]: + systemd-cat echo yo
[ 721.921413] testsuite-04.sh[562]: + journalctl --sync
[ 722.088945] testsuite-04.sh[1018]: ++ journalctl -o export -n 1
[ 722.104040] testsuite-04.sh[1019]: ++ grep -a __SEQNUM=
[ 722.117239] testsuite-04.sh[1020]: ++ cut -d= -f2
[ 722.314936] testsuite-04.sh[562]: + SEQNUM2=495786
[ 722.317906] testsuite-04.sh[562]: + test 495786 -gt '495773
[ 722.319737] testsuite-04.sh[562]: ++ grep -a __SEQNUM
[ 722.321609] testsuite-04.sh[562]: grep -a __SEQNUM'
[ 722.323536] testsuite-04.sh[562]: /usr/lib/systemd/tests/testdata/units/testsuite-04.sh: line 276: test: 495773
[ 722.325744] testsuite-04.sh[562]: ++ grep -a __SEQNUM
[ 722.327498] testsuite-04.sh[562]: grep -a __SEQNUM: integer expression expected
[ 722.329528] testsuite-04.sh[562]: + journalctl --rotate --vacuum-size=16M
$ build/journalctl --file /var/tmp/systemd-test.0HpVjt/system.journal -o export | grep -a __SEQNUM=
...
__SEQNUM=214849
__SEQNUM=214850
MESSAGE=++ grep -a __SEQNUM=
_CMDLINE=grep -a __SEQNUM=
__SEQNUM=214851
...
__SEQNUM=214860
MESSAGE=++ grep -a __SEQNUM=
_CMDLINE=grep -a __SEQNUM=
__SEQNUM=214861
__SEQNUM=214862
__SEQNUM=214863
...
Let's anchor the expression to avoid this.
Follow-up to f28ed2c1be .
2023-02-17 07:03:00 +09:00
Luca Boccassi
6f97aae029
Merge pull request #26213 from poettering/journal-rework-seqnum
...
journal sequence number rework
2023-02-15 19:58:58 +00:00
Yu Watanabe
0b75493da0
tree-wide: fix typo and comment style update
2023-02-15 10:08:16 +09:00
Quentin Deslandes
41b7fcc5e8
journald: fix ignored filtering patterns for delegated cgroups
...
If a service defines Delegate=yes, its subcgroup won't inherit the
LogFilterPatterns= option, because the option is stored on the unit's
cgroup attributes, not on the subcgroup.
Fixed by using the unit's cgroup attributes instead.
2023-02-08 16:52:51 +01:00
Lennart Poettering
f28ed2c1be
test: add basic seqnum test
2023-02-08 13:52:14 +01:00
Lennart Poettering
2bc70e2e9d
logs-show: show seqnum info in export+json output mode
2023-02-08 13:42:29 +01:00
Luca Boccassi
398dc7d39b
core: imply DeviceAllow=/dev/tpmrm0 with LoadCredentialEncrypted
...
If the device access policy is restricted, add implicitly access to the TPM
if at least one encrypted credential needs to be loaded.
Fixes https://github.com/systemd/systemd/issues/26042
2023-02-08 10:59:55 +00:00
Luca Boccassi
b0fc23fae5
cryptenroll: do not implicitly verify with default tpm policy signature
...
If it was not requested to use a tpm2 signature file when enrolling, do
not fallback to the default /run/systemd/tpm2-pcr-signature.json as it
likely will be unrelated if it exists.
Fixes https://github.com/systemd/systemd/issues/25435
2023-02-08 10:58:57 +00:00
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
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