Frantisek Sumsal
33dff897b9
test: merge TEST-11-ISSUE-3166 into TEST-07-PID1
2023-05-10 14:29:38 +02:00
Frantisek Sumsal
a8faac7dae
test: merge TEST-10-ISSUE-2467 with TEST-07-PID1
2023-05-10 14:29:38 +02:00
Frantisek Sumsal
4966a31ba3
test: merge TEST-09-ISSUE-2691 into TEST-07-PID1
2023-05-10 14:29:38 +02:00
Frantisek Sumsal
cd62ba42a4
test: merge TEST-08-ISSUE-2730 into TEST-07-PID1
2023-05-10 14:29:38 +02:00
Frantisek Sumsal
09c033a276
test: rename TEST-07-ISSUE-1981 to TEST-07-PID1
2023-05-10 12:38:57 +02:00
Frantisek Sumsal
a9fe7f66e8
test: slightly extend systemd-cryptenroll coverage
2023-05-09 22:47:42 +02:00
Frantisek Sumsal
920eb35db9
test: TEST-70-TPM2 cleanup
...
No functional changes.
2023-05-09 21:18:36 +02:00
Frantisek Sumsal
5e8656e101
test: discard kill's output
2023-05-09 19:55:04 +02:00
Frantisek Sumsal
539af5c441
test: merge unit file related tests into TEST-23-UNIT-FILE
...
Rename TEST-23-TYPE-EXEC to TEST-23-UNIT-FILE and merge it with
following tests:
- TEST-37-RUNTIMEDIRECTORYPRESERV
- TEST-40-EXEC-COMMAND-EX
- TEST-41-ONESHOT-RESTART
- TEST-42-EXECSTOPPOST
- TEST-57-ONSUCCESS-UPHOLD
2023-05-10 02:39:12 +09:00
Zbigniew Jędrzejewski-Szmek
dcbbc7cef5
test/run-unit-tests, TEST-02: skip tests where the interpeter is not installed
...
When the interpeter is missing, we get an exit code of 127. Let's treat those
tests as skipped too. If we could run the test far enough so that it could do
the check itself, it would return 77 anyway.
$ test/asdf; echo $?
exec: Failed to execute process 'test/asdf': The file specified the interpreter '/bin/asdf', which is not an executable command.
127
$ test/asdf; echo $?
/usr/bin/env: ‘/bin/asdf’: No such file or directory
127
This should resolve the problem that TEST-02 fails or Debian's 'unit-tests' fail
when python3 is not installed. Installing python3 via the mechanism that is
used to construct TEST images, i.e. the dracut dependency chasing scheme, would
be a lot of work for python with its modules in multiple locations and hundreds
of little files. So I think it OK to just skip the test there, and also in
other cases where python is not available.
2023-05-09 08:11:10 +02:00
Frantisek Sumsal
b003e2c7a6
test: clean up the test script even further
...
Most notably:
- use `systemd-id128 new` instead of `journalctl --new-id128`
- move all temporary files to /tmp
- wrap repetitive checks in a function
2023-05-03 18:32:00 +02:00
Frantisek Sumsal
8077d99fd2
test: vacuum the journal after the "stress test"
...
To make the rest of the test significantly faster.
2023-05-03 17:37:09 +02:00
Frantisek Sumsal
23f83ba768
test: slightly extend checks on corrupted journals
2023-05-03 17:32:36 +02:00
Frantisek Sumsal
c4039ceb9e
test: further extend our collection of corrupted journals
...
And make adding them slightly easier.
Provides coverage for b5335da7a5 .
2023-05-03 17:22:37 +02:00
Yu Watanabe
e94756c566
test: replace sleep with timeout
...
If the test environment is too slow, then sleeping 2 seconds may not be
sufficient.
2023-05-02 11:09:18 +02:00
Frantisek Sumsal
0f69a4e9ae
test: test journalctl with corrupted journals
...
Last month I monkey-patched journald to produce a small (64K) but valid
journal and used that as an input to four AFL fuzzers. After a month it
generated quite a nice corpora (4738 test cases) and after filtering
and minimizing it I was left with 619 unique journals with various
levels of corruption that probe the journal code.
It seems to detect past issues like systemd#26567, etc.
2023-05-01 10:14:12 +02:00
Frantisek Sumsal
de965f4893
test: clean up the test script a bit
2023-05-01 15:47:04 +09:00
Frantisek Sumsal
992e06df08
test: make sure the test units have a test- prefix
...
So when collecting coverage the test-.service dropin works as
expected.
Follow-up to 969f5f3cea .
2023-04-29 16:59:08 +02:00
Frantisek Sumsal
edea0d6ac5
test: match all messages with the FILE field
...
As the systemd-pstore process is quite short lived, it might sometimes
lack the necessary metadata to make matching against a unit or a syslog
tag work. Since we already use a cursor file to make the matching window
small as possible, let's just drop the unit match completely and hope
for the best.
Resolves : #27453
2023-04-29 16:58:40 +02:00
Yu Watanabe
843cb225ad
test: add tests for "systemctl stop" vs triggering by path unit
2023-04-29 09:10:28 +09:00
Yu Watanabe
2e701a7946
test: create temporary units under /run
2023-04-29 09:10:28 +09:00
Luca Boccassi
398d858d1c
Merge pull request #27437 from mrc0mmand/pstore
...
test: add a couple of tests for systemd-pstore
2023-04-28 16:14:09 +01:00
Frantisek Sumsal
6858e32d73
test: add a couple of tests for systemd-pstore
2023-04-28 13:16:45 +02:00
Franck Bui
fd34e27fb9
test: dont use anchor char '$' to match a part of a string
...
When anchoring the pattern using '$' regular expression operator it forces '=~'
operator to match the entire string.
2023-04-27 22:42:51 +08:00
Mike Yuan
82060b62c9
Merge pull request #25622 from YHNdnzj/tmpfiles-X-bit-support
...
tmpfiles: add conditionalized execute permission (X) support
2023-04-27 22:40:09 +08:00
Lennart Poettering
969f5f3cea
test: extend test 19 to also verify DelegateSubgroup= works
2023-04-27 14:15:50 +02:00
Mike Yuan
f582e61bc3
test: tmpfiles: add tests on conditionalized execute bit
2023-04-27 15:18:31 +08:00
Luca Boccassi
66a0ee55d8
Merge pull request #27355 from fbuihuu/kbd-improve-vc2x11-conversion
...
locale: improve vc -> x11 keyboard conversion
2023-04-26 23:37:53 +01:00
Luca Boccassi
68b12e2d56
Merge pull request #27421 from bluca/coredump_filter
...
CoredumpFilter: fix stack overflow and invalid assignment with 'all'
2023-04-26 23:22:59 +01:00
Daan De Meyer
fec81dedfd
Merge pull request #27415 from DaanDeMeyer/verity-minimize
...
repart: Add Minimize= support for verity hash partitions
2023-04-26 18:55:51 +02:00
Luca Boccassi
cf636aa59e
test: add coverage for CoredumpFilter=all
2023-04-26 16:12:00 +01:00
Frantisek Sumsal
914f280d0c
test: tell dfuzzer to skip Reexecute()
...
As described in systemd/systemd#27204 reexecuting the daemon while
running in a systemd-run "session" causes the session end prematurely.
Let's skip the Reexecute() method in dfuzzer and trigger it manually
until the issue is resolved.
2023-04-26 14:41:05 +02:00
Daan De Meyer
5eef704734
repart: Add Minimize= support for verity hash partitions
...
Fixes #27414
2023-04-26 14:15:16 +02:00
Franck Bui
b35f71ac1a
locale: when no xvariant match select the entry with an empty xvariant
...
When doing a conversion and the specified 'xc->xvariant' has no match, select
the x11 layout entry with a matching layout and an empty xvariant if such entry
exists. It's still better than no conversion at all.
2023-04-26 08:15:17 +02:00
Frantisek Sumsal
ad2875af9e
test: add a couple of sanity tests for systemd-creds
2023-04-25 18:34:49 +02:00
Zbigniew Jędrzejewski-Szmek
4481a30855
test: use idiomatic bash loop iteration
...
In a few cases, also avoid a sleep in the last (failed) iteration of the loop.
It doesn't matter too much, but it's still ugly.
2023-04-24 21:59:28 +02:00
Zbigniew Jędrzejewski-Szmek
97b35c7cec
testsuite-54: drop unnecessary pipe
2023-04-24 21:59:28 +02:00
Zbigniew Jędrzejewski-Szmek
add53f9b93
testsuite-70: drop unnecessary env
2023-04-24 21:59:27 +02:00
Zbigniew Jędrzejewski-Szmek
128db0aa00
test: drop uses of "&& { echo 'unexpected success'; exit 1; }"
...
Brief is sweet.
2023-04-24 21:58:35 +02:00
Zbigniew Jędrzejewski-Szmek
a1e5bd2066
testsuite-04: remove unnecessary conditional
2023-04-24 10:06:59 +02:00
Zbigniew Jędrzejewski-Szmek
f65c2f5214
testsuite-04: remove redirection, drop whitespace after redirection op
2023-04-24 10:06:59 +02:00
Luca Boccassi
21453b8b4b
Merge pull request #27349 from mrc0mmand/codespell
...
tree-wide: code spelling fixes
2023-04-20 22:02:17 +01:00
Frantisek Sumsal
94d82b5980
tree-wide: code spelling fixes
...
As reported by Fossies.
2023-04-20 21:54:59 +02:00
Frantisek Sumsal
574d09bad0
test: prefix the transient unit with test- to make coverage runs happy
...
See 9fd8226312 for more details.
Follow-up to c9210b7470 .
2023-04-18 14:55:08 +01:00
Luca Boccassi
c9210b7470
creds: make available to all ExecStartPre= and ExecStart= processes
...
Fixes https://github.com/systemd/systemd/issues/27275
2023-04-17 17:47:28 +01:00
Yu Watanabe
f384ce1187
Merge pull request #27283 from mrc0mmand/assorted-test-tweaks
...
test: a bunch of assorted tweaks, Saturday edition
2023-04-16 19:39:58 +09:00
Frantisek Sumsal
f7f5657ece
test: add a couple of basic sanity tests for the security verb
2023-04-16 09:21:13 +02:00
Frantisek Sumsal
a51ba8e31a
test: add a couple of basic sanity tests for timedatectl
2023-04-16 09:21:13 +02:00
Luca Boccassi
4d7a06b322
Merge pull request #27273 from mrc0mmand/test-generators
...
test: add a couple of tests for getty/run/system-update generators
2023-04-14 21:31:55 +01:00
Frantisek Sumsal
3a8b7e8b5f
test: stop the test unit when it's not needed anymore
...
Otherwise it keeps printing stuff to the journal/console, adding
unnecessary noise.
2023-04-14 21:13:14 +02:00