Frantisek Sumsal
380a36582d
test: add a test case for #27521
...
Which got resolved by e652663a04.
2023-05-05 22:15:23 +02:00
Frantisek Sumsal
24e91e08f8
core: check the unit type more thoroughly when deserializing
...
Resolves : #27523
2023-05-05 22:15:23 +02:00
Frantisek Sumsal
cc938f1ce0
shared: refuse fd == INT_MAX
...
Since we do `FD_TO_PTR(fd)` that expands to `INT_TO_PTR(fd) + 1` which
triggers an integer overflow.
Resolves : #27522
2023-05-05 22:15:23 +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
a76dc1f3a0
Merge pull request #27504 from mrc0mmand/fuzz-manager-serialize
...
test: add a simple fuzzer for manager serialization
2023-05-03 21:45:26 +09:00
Frantisek Sumsal
740831076c
shared: reject empty attachment path
2023-05-03 10:09:53 +02:00
Frantisek Sumsal
1febf60f9d
shared: ignore invalid valink socket fd when deserializing
2023-05-03 10:09:53 +02:00
Frantisek Sumsal
45b1017488
core: fix NULL pointer dereference during deserialization
2023-05-03 10:09:53 +02:00
Frantisek Sumsal
24e6759cbc
test: add a simple fuzzer for manager serialization
2023-05-03 10:09:53 +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
Yu Watanabe
8e2449a5c9
test-network: add workaround for bug in iproute2 v6.2.0
...
Closes #27473 .
2023-05-01 20:02:15 +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
Zbigniew Jędrzejewski-Szmek
1db4acbe5d
Merge pull request #27398 from yuwata/udev-rule-negative-match
...
udev-rule: fix negative match
2023-04-26 16:40:01 +02: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
Yu Watanabe
a101d91988
test: add test case of negative match for SYMLINK and TAG
2023-04-26 09:51:12 +09: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
Yu Watanabe
c19f1cc9a5
test: add regression tests for find_esp() and friend
2023-04-19 04:04:57 +09: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