1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

58376 Commits

Author SHA1 Message Date
Frantisek Sumsal
5309b56505 test: drop the at_exit() coredump check
since we don't truncate the journal anymore.
2022-06-21 10:13:48 +02:00
Frantisek Sumsal
d3eb4159c9 test: make dfuzzer less verbose
Otherwise it oversaturates the journal, which in some cases can't keep
up with the load of messages (due to the performance penalty caused by
sanitizers), and gets killed by a watchdog.
2022-06-21 10:04:03 +02:00
Frantisek Sumsal
5dffa6b032 test: always force a new image for dfuzzer
Otherwise we might end up with an image containing broken service
symlinks and other things, which break certain parts of the test.
2022-06-21 10:01:30 +02:00
Zbigniew Jędrzejewski-Szmek
107795a759 pkgconfig,rpm: expose vars for user-tmpfiles.d location
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2098553.
2022-06-21 15:49:41 +09:00
Frantisek Sumsal
0897048500 test: use saved process PID instead of %%
As the `%%` specifier might fail if the current job (i.e. the last
background job) already finished:

```
[   61.692196] testsuite-04.sh[656]: ++ systemd-id128 new
[   61.705407] testsuite-04.sh[263]: + ID=912cb8f8ef304153a123f772bb0fe9e0
[   61.706318] testsuite-04.sh[657]: + systemd-cat -t 912cb8f8ef304153a123f772bb0fe9e0 bash -c 'echo parent; (echo child) & wait'
[   61.720940] testsuite-04.sh[263]: + PID=657
[   61.721126] testsuite-04.sh[263]: + wait %%
[   61.723014] testsuite-04.sh[263]: /usr/lib/systemd/tests/testdata/units/testsuite-04.sh: line 96: wait: %%: no such job
```
2022-06-20 17:56:09 +00:00
Evgeny Vereshchagin
653e4a153b
Merge pull request #22547 from mrc0mmand/dfuzzer
test: fuzz our dbus interfaces with dfuzzer
2022-06-20 02:42:09 +03:00
Frantisek Sumsal
d768243a95 test: skip TEST-21-DFUZZER without ASan
as the test is quite time consuming and it yields more useful reports
when the target app is built with sanitizers.
2022-06-19 16:22:35 +02:00
Frantisek Sumsal
354b3364aa test: fuzz our dbus interfaces with dfuzzer 2022-06-19 16:22:35 +02:00
Frantisek Sumsal
508a7f04b3 test: make masking of supplementary services configurable 2022-06-19 11:27:41 +02:00
Yu Watanabe
e83cfbf972 locale: drop unnecessary allocation
Fixes a bug introduced by 3d36b5d7e7.

Fixes #23777.
2022-06-18 14:46:45 +01:00
Yu Watanabe
297cc64bfb
Merge pull request #23771 from mrc0mmand/test-tweaks
A couple of test-output-related tweaks
2022-06-18 10:45:22 +09:00
Marc Kleine-Budde
25ed7633b1 networkctl: fix output of "status": replace "Queue Length" by "Number of Queues"
Commit 0307afc681 ("networkctl: add support to display Transmit/Recieve queue
length (#12633)") added the display of the number of RX and TX Queues to the
output of `networkctl status $DEV`. However the row description says "Queue
Length".

This patch fixes the output by replacing "Queue Length" by "Number of Queues".

Fixes: 0307afc681 ("networkctl: add support to display Transmit/Recieve queue length (#12633)")
2022-06-18 10:44:42 +09:00
Philipp Gortan
2751ad9c3f add program name to log line 2022-06-18 10:43:03 +09:00
Foster Snowhill
1132f004b3 cryptenroll: fix typo in manpage 2022-06-18 10:42:13 +09:00
Frantisek Sumsal
8cda7b91ff test: check journal directly instead of capturing console output 2022-06-17 17:32:41 +02:00
Frantisek Sumsal
35d2d2e61c test: run the custom check hooks before common checks
since we delete the guest journals as part of the save_journal() step in
check_result_common(), making journal inaccessible from the custom check
hooks.
2022-06-17 17:28:13 +02:00
Frantisek Sumsal
4b9a0c3aeb test: pass the initdir to check_result_{qemu,nspawn} hooks 2022-06-17 17:14:45 +02:00
Frantisek Sumsal
72f0e89c0d test: fix a couple of issues found by shellcheck 2022-06-17 15:28:17 +02:00
Frantisek Sumsal
c84d1c9822 test: don't flush debug logs to the console
Let's keep the debug logs in the journal, while logging only
testsute-*.sh stdout/stderr to the console (ba7abf7). This should make
the test output log a bit more readable and potentially the tests itself
a bit faster by avoiding console oversaturation.

Also, it should significantly reduce the size of artifacts kept by CIs.
2022-06-17 15:06:59 +02:00
Frantisek Sumsal
94850fb956 test: always wrap useradd/userdel when running w/ ASan
since they dlopen() PAM modules, including systemd ones.
2022-06-17 14:51:52 +02:00
Frantisek Sumsal
582547cbd3 test: make the busy loop in TEST-02 less verbose
as it unnecessarily clogs the logs.
2022-06-17 14:51:52 +02:00
Luca Boccassi
9dd98db27d
Merge pull request #23756 from yuwata/analyze-seccomp-filter
analyze: fix seccomp filter handling in security command
2022-06-17 09:58:14 +01:00
Jan Janssen
01d81c126b meson: Reorder cflags for sd-boot
Currently, -Wall and -Wextra override previously passed flags like
-Wno-unused-parameter. This reorders them to be passed before any
optional flags. -Wsign-compare is part of -Wextra and therefore dropped.
-nostdlib is a link-stage flag and dropped as it is already part of
efi_ldflags.
2022-06-17 12:57:41 +09:00
Frantisek Sumsal
ba7abf79a5 test: send stdout/stderr of testsuite units to journal & console
to make debugging in CIs slightly easier.
2022-06-17 12:54:50 +09:00
Yu Watanabe
cf906beaef test: add syscall filter tests for analyze security 2022-06-17 12:45:45 +09:00
Yu Watanabe
6d6a08547c seccomp-util: make @known include @obsolete
@known is generated from syscall-list.txt, which generated from kernel
headers. So, some syscalls in @obsolete may not be listed in
syscall-list.txt.
2022-06-17 12:40:43 +09:00
Yu Watanabe
5862e5561c analyze-security: always save syscall name
This reverts dd51e725df and fixes bugs
introduced by 1624114d74.

Previously,
- On online scan, the syscall filter was a string Hashmap, but it
  might contain syscall name with errno or error action. Hence, we need
  to drop the errno or error action in the string.
- On offline scan, the syscall filter was a Hashmap of syscall ID, so
  hashmap_contains() with syscall name did not work. We need to convert
  syscall IDs to syscall names.
- If hashmap_contains() in syscall_names_in_filter() is true, then
  the syscall is allowed when the list is an allow-list, and vice versa.
  Hence, the condition in syscall_names_in_filter() was errnously
  inverted by dd51e725df.

This makes syscalls are always stored with its name, instead of ID,
and also correct the condition.

Fixes #23663.
2022-06-17 12:37:56 +09:00
Yu Watanabe
cb649d12bf set: introduce set_put_strndup()
Note, if `n != SIZE_MAX`, we cannot check the existence of the specified
string in the set without duplicating the string. And, set_consume() also
checks the existence of the string. Hence, it is not necessary to call
set_contains() if `n != SIZE_MAX`.
2022-06-17 12:28:36 +09:00
Yu Watanabe
1008d415e7 core/dbus-execute: drop unnecessary flag
The code block is called only when the list was empty, and the newly
requested list is allow-list. Hence, invert_flag is always zero here.
2022-06-17 12:26:50 +09:00
Yu Watanabe
8c93ebbdf0 core/dbus-execute: do not append denied syscalls in allow-list
Follow-up for 68acc1afbe.

Before the commit, SystemCallFilter bus property provides only allowed
syscalls if ExecContext.syscall_filter is an allow-list, and vice versa.

After the commit, if the list is allow-list, it contains allowed
syscalls with value `-1`, and denied syscalls with non-negative values.

To keep the backward compatibility, denied syscalls must be dropped in
SystemCallFilter bus property.
2022-06-17 12:19:39 +09:00
Yu Watanabe
75176c7914
Merge pull request #23741 from mrc0mmand/more-asan-tweaks
test: wrap certain uninstrumented binaries to make them work w/ ASan
2022-06-16 12:10:56 +09:00
Yu Watanabe
05ab439a62 nspawn: fix UID map string
We send/recv the set of payload uid, host uid, payload gid, host gid.
Hence, the index must be incremented with 4, instead of 2.

Fixes #23664.
2022-06-16 11:52:59 +09:00
Vishal Chillara Srinivas
f941c12427 RFC 6762 section 7.1: a Multicast DNS querier SHOULD NOT include records in the
Known-Answer list whose remaining TTL is less than half of their original TTL
2022-06-16 10:44:25 +09:00
Vishal Chillara Srinivas
82af03c223 resolve: mark mDNS RRs in the Additional Records section as cacheable
RFC 6762 does not restrict caching of records in the Additional section.
Caching can improve resolve efficiency.
2022-06-16 10:44:07 +09:00
Frantisek Sumsal
b727d7e02d test: don't wrap binaries built with ASan
since they should handle loading other instrumented libraries without
issues.
2022-06-16 00:02:35 +02:00
Frantisek Sumsal
fa65ba6baa test: drop all LD_PRELOAD-related ASan workarounds
since they shouldn't be necessary anymore, as we tweak the "problematic"
binaries on per-binary basis.
2022-06-16 00:02:35 +02:00
Frantisek Sumsal
3917534d62 test: wrap binaries using systemd DSOs when running w/ ASan
Let's detect & wrap binaries which are linked against systemd DSOs and
we're running under ASan, since otherwise running such binaries ends
with:

```
==633==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
```
2022-06-16 00:02:35 +02:00
Yu Watanabe
172cbcdc8b tree-wide: fix typo 2022-06-15 14:50:34 +09:00
Yu Watanabe
eed6ee82df
Merge pull request #23733 from sshedi/cid-1469711
homework: initialize we_detached
2022-06-15 12:03:24 +09:00
Yu Watanabe
4589c1d734
Merge pull request #23709 from yuwata/test-hostname-locale
test: import hostname and locale tests from debian/ubuntu test suite
2022-06-15 12:00:22 +09:00
Frantisek Sumsal
aca811544e Revert "test: fix TEST-70 under sanitizers"
This reverts commit 47d81bc613.
2022-06-14 22:57:07 +02:00
adrian5
b105d41304 man: Add some punctuation; remove double spaces. 2022-06-15 03:22:15 +09:00
Shreenidhi Shedi
c9f5ac0917 sd-journal: check retval of sd_id128_from_string call
Fixes: CID#1469712

CID 1469712 (#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from sd_id128_from_string(word + 2, &boot_id) to r here,
but that stored value is overwritten before it can be used.
2022-06-14 17:52:48 +05:30
Shreenidhi Shedi
2f4ad53549 homework: initialize we_detached
Fixes: CID#1469711

CID 1469711 (#1 of 1): Uninitialized scalar variable (UNINIT)
14. uninit_use: Using uninitialized value we_detached.
2022-06-14 17:52:46 +05:30
Yu Watanabe
6243063824 test: use trap RETURN 2022-06-14 21:08:04 +09:00
Yu Watanabe
4627fb80bf test: move "do" at the end of line 2022-06-14 21:06:06 +09:00
Yu Watanabe
2f34ee3329 test: insert space in for loop 2022-06-14 21:05:10 +09:00
Yu Watanabe
47ba157cc0 test: import localed tests from debian/ubuntu test suite 2022-06-14 20:59:36 +09:00
Yu Watanabe
4ce68ea9b3 test: install C.UTF-8 and English locales 2022-06-14 20:59:36 +09:00
Yu Watanabe
1136175c7f test: install libxkbcommon and x11 keymaps 2022-06-14 20:59:36 +09:00