2020-11-09 05:23:58 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-18 18:32:01 +01:00
|
|
|
|
2017-04-07 06:19:09 +02:00
|
|
|
awkscript = 'test-hashmap-ordered.awk'
|
|
|
|
test_hashmap_ordered_c = custom_target(
|
2017-04-18 01:25:00 +02:00
|
|
|
'test-hashmap-ordered.c',
|
|
|
|
input : [awkscript, 'test-hashmap-plain.c'],
|
|
|
|
output : 'test-hashmap-ordered.c',
|
|
|
|
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
2018-09-12 14:47:56 +02:00
|
|
|
capture : true,
|
|
|
|
build_by_default : want_tests != 'false')
|
2017-04-07 06:19:09 +02:00
|
|
|
|
|
|
|
test_include_dir = include_directories('.')
|
|
|
|
|
2019-11-07 11:32:26 +01:00
|
|
|
path = run_command('sh', ['-c', 'echo "$PATH"']).stdout().strip()
|
2017-04-07 06:19:09 +02:00
|
|
|
test_env = environment()
|
|
|
|
test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
|
|
|
|
test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
|
2019-11-07 11:32:26 +01:00
|
|
|
test_env.set('PATH', '@0@:@1@'.format(meson.build_root(), path))
|
2017-04-07 06:19:09 +02:00
|
|
|
|
2017-04-10 20:13:40 +02:00
|
|
|
############################################################
|
|
|
|
|
|
|
|
generate_sym_test_py = find_program('generate-sym-test.py')
|
|
|
|
|
|
|
|
test_libsystemd_sym_c = custom_target(
|
2017-04-18 01:25:00 +02:00
|
|
|
'test-libsystemd-sym.c',
|
|
|
|
input : [libsystemd_sym_path] + systemd_headers,
|
|
|
|
output : 'test-libsystemd-sym.c',
|
|
|
|
command : [generate_sym_test_py, libsystemd_sym_path] + systemd_headers,
|
2018-09-12 14:47:56 +02:00
|
|
|
capture : true,
|
|
|
|
build_by_default : want_tests != 'false')
|
2017-04-10 20:13:40 +02:00
|
|
|
|
2017-04-10 21:20:42 +02:00
|
|
|
test_libudev_sym_c = custom_target(
|
2017-04-18 01:25:00 +02:00
|
|
|
'test-libudev-sym.c',
|
|
|
|
input : [libudev_sym_path, libudev_h_path],
|
|
|
|
output : 'test-libudev-sym.c',
|
|
|
|
command : [generate_sym_test_py, '@INPUT0@', '@INPUT1@'],
|
2018-09-12 14:47:56 +02:00
|
|
|
capture : true,
|
|
|
|
build_by_default : want_tests != 'false')
|
2017-04-10 21:20:42 +02:00
|
|
|
|
2017-04-15 02:10:28 +02:00
|
|
|
test_dlopen_c = files('test-dlopen.c')
|
|
|
|
|
2017-04-10 20:13:40 +02:00
|
|
|
############################################################
|
|
|
|
|
2017-11-22 14:13:32 +01:00
|
|
|
test_systemd_tmpfiles_py = find_program('test-systemd-tmpfiles.py')
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
2017-04-07 06:19:09 +02:00
|
|
|
tests += [
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-device-nodes.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-engine.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[libcore,
|
2017-12-19 20:54:46 +01:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid]],
|
|
|
|
|
2018-10-16 13:28:39 +02:00
|
|
|
[['src/test/test-emergency-action.c'],
|
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[]],
|
|
|
|
|
2018-10-19 11:31:37 +02:00
|
|
|
[['src/test/test-chown-rec.c'],
|
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[]],
|
|
|
|
|
2020-12-07 14:15:36 +01:00
|
|
|
[['src/test/test-dlopen-so.c'],
|
|
|
|
[libshared],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-job-type.c'],
|
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid]],
|
|
|
|
|
|
|
|
[['src/test/test-ns.c'],
|
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid],
|
2017-04-25 01:28:05 +02:00
|
|
|
'', 'manual'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/test/test-loopback.c'],
|
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid]],
|
|
|
|
|
|
|
|
[['src/test/test-dns-domain.c'],
|
|
|
|
[libcore,
|
2020-10-28 17:31:40 +01:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-boot-timestamps.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'ENABLE_EFI'],
|
|
|
|
|
2019-04-02 11:22:56 +02:00
|
|
|
[['src/test/test-unit-file.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-unit-name.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-load-fragment.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid]],
|
|
|
|
|
2018-10-23 12:00:31 +02:00
|
|
|
[['src/test/test-serialize.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-utf8.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-07-27 18:04:11 +02:00
|
|
|
[['src/test/test-dev-setup.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-capability.c'],
|
|
|
|
[],
|
|
|
|
[libcap]],
|
|
|
|
|
|
|
|
[['src/test/test-async.c'],
|
|
|
|
[],
|
2017-12-05 08:21:16 +01:00
|
|
|
[],
|
|
|
|
'', 'timeout=120'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/test/test-locale-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-copy.c'],
|
2017-12-19 14:19:46 +01:00
|
|
|
[],
|
2017-04-18 01:25:00 +02:00
|
|
|
[]],
|
|
|
|
|
2018-12-03 13:37:18 +01:00
|
|
|
[['src/test/test-static-destruct.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-sigbus.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-condition.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-fdset.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-fstab-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-06-26 00:01:02 +02:00
|
|
|
[['src/test/test-random-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-04-11 20:03:39 +02:00
|
|
|
[['src/test/test-format-table.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-06-19 02:52:45 +02:00
|
|
|
[['src/test/test-format-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-ratelimit.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-07-04 15:42:04 +02:00
|
|
|
[['src/test/test-json.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-11-24 13:55:02 +01:00
|
|
|
[['src/test/test-modhex.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
test-libmount: let's see how libmount parses stuff
With libmount-2.33.1-3.fc30.x86_64 I get:
/* test_libmount_unescaping_one escaped space + utf8 */
from '729 38 0:59 / /tmp/\342\200\236zupa\\040z\304\231bowa\342\200\235 rw,relatime shared:395 - tmpfs die\\040Br\303\274he rw,seclabel'
source: 'die Brühe'
source: 'die Br\303\274he'
source: 'die Brühe'
expected: 'die Brühe'
target: '/tmp/„zupa zębowa”'
target: '/tmp/\342\200\236zupa z\304\231bowa\342\200\235'
target: '/tmp/„zupa zębowa”'
expected: '/tmp/„zupa zębowa”'
/* test_libmount_unescaping_one escaped newline */
from '729 38 0:59 / /tmp/x\\012y rw,relatime shared:395 - tmpfs newline rw,seclabel'
source: 'newline'
source: 'newline'
source: 'newline'
expected: 'newline'
target: '/tmp/x
y'
target: '/tmp/x\ny'
target: '/tmp/x
y'
expected: '/tmp/x
y'
/* test_libmount_unescaping_one empty source */
from '760 38 0:60 / /tmp/emptysource rw,relatime shared:410 - tmpfs rw,seclabel'
source: ''
source: ''
source: ''
expected: ''
target: '/tmp/emptysource'
target: '/tmp/emptysource'
target: '/tmp/emptysource'
expected: '/tmp/emptysource'
/* test_libmount_unescaping_one foo\rbar */
from '790 38 0:61 / /tmp/foo\rbar rw,relatime shared:425 - tmpfs tmpfs rw,seclabel'
source: 'tmpfs'
source: 'tmpfs'
source: 'tmpfs'
expected: 'tmpfs'
target: '/tmp/foo'
target: '/tmp/foo'
target: '/tmp/foo'
expected: 'n/a'
With https://github.com/karelzak/util-linux/issues/780 fixed, we get
/* test_libmount_unescaping_one foo\rbar */
from '790 38 0:61 / /tmp/foo\rbar rw,relatime shared:425 - tmpfs tmpfs rw,seclabel'
source: 'tmpfs'
source: 'tmpfs'
source: 'tmpfs'
expected: 'tmpfs'
target: '/tmp/foo
bar'
target: '/tmp/foo\rbar'
target: '/tmp/foo
bar'
expected: '/tmp/foo
bar'
2019-04-05 09:43:12 +02:00
|
|
|
[['src/test/test-libmount.c'],
|
|
|
|
[],
|
|
|
|
[threads,
|
|
|
|
libmount]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-mount-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-11-29 10:24:39 +01:00
|
|
|
[['src/test/test-mountpoint-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-exec-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-hexdecoct.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-alloc-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-xattr-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-io-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-glob-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-fs-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2019-04-30 09:53:09 +02:00
|
|
|
|
|
|
|
[['src/test/test-umask-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/test/test-proc-cmdline.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-fd-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-web-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-cpu-set-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-stat-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-03-26 16:32:40 +02:00
|
|
|
[['src/test/test-os-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-09-08 15:13:44 +02:00
|
|
|
[['src/test/test-libcrypt-util.c'],
|
|
|
|
[],
|
2020-11-13 23:48:37 +01:00
|
|
|
[],
|
|
|
|
'', 'timeout=120'],
|
2020-09-08 15:13:44 +02:00
|
|
|
|
2020-07-18 14:03:51 +02:00
|
|
|
[['src/test/test-offline-passwd.c',
|
|
|
|
'src/shared/offline-passwd.c',
|
|
|
|
'src/shared/offline-passwd.h'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-escape.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2019-07-28 10:13:21 +02:00
|
|
|
|
|
|
|
[['src/test/test-exit-status.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
2017-11-21 17:52:31 +01:00
|
|
|
[['src/test/test-specifier.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-string-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-extract-word.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-parse-util.c'],
|
|
|
|
[],
|
2020-10-15 17:56:30 +02:00
|
|
|
[libseccomp]],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
2020-01-16 15:53:57 +01:00
|
|
|
[['src/test/test-sysctl-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-09-25 16:31:42 +02:00
|
|
|
[['src/test/test-user-record.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-user-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-12-04 18:39:23 +01:00
|
|
|
[['src/test/test-hostname-setup.c'],
|
|
|
|
[],
|
2020-12-04 18:45:23 +01:00
|
|
|
[]],
|
2020-12-04 18:39:23 +01:00
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-hostname-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-process-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-terminal-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-path-lookup.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-11-20 15:42:57 +01:00
|
|
|
[['src/test/test-pretty-print.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-uid-range.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-cap-list.c',
|
|
|
|
generated_gperf_headers],
|
|
|
|
[],
|
|
|
|
[libcap]],
|
|
|
|
|
|
|
|
[['src/test/test-socket-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-01-10 17:22:37 +01:00
|
|
|
[['src/test/test-socket-netlink.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-09-01 14:25:59 +02:00
|
|
|
[['src/test/test-in-addr-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-barrier.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-tmpfiles.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-namespace.c'],
|
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
libblkid]],
|
|
|
|
|
|
|
|
[['src/test/test-verbs.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-install-root.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-acl-util.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'HAVE_ACL'],
|
|
|
|
|
|
|
|
[['src/test/test-seccomp.c'],
|
|
|
|
[],
|
|
|
|
[libseccomp],
|
|
|
|
'HAVE_SECCOMP'],
|
|
|
|
|
|
|
|
[['src/test/test-rlimit-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-ask-password-api.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'', 'manual'],
|
|
|
|
|
|
|
|
[['src/test/test-signal-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-09-25 18:26:53 +02:00
|
|
|
[['src/test/test-loop-block.c'],
|
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libblkid],
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
[],
|
|
|
|
includes,
|
|
|
|
false],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-selinux.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-sizeof.c'],
|
|
|
|
[libbasic],
|
|
|
|
[]],
|
|
|
|
|
2019-11-09 11:50:25 +01:00
|
|
|
[['src/test/test-bpf-devices.c'],
|
2016-11-03 17:31:25 +01:00
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[libmount,
|
|
|
|
threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libblkid]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-bpf-firewall.c'],
|
2016-11-03 17:31:25 +01:00
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[libmount,
|
|
|
|
threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libblkid]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-watch-pid.c'],
|
core: rework how we track which PIDs to watch for a unit
Previously, we'd maintain two hashmaps keyed by PIDs, pointing to Unit
interested in SIGCHLD events for them. This scheme allowed a specific
PID to be watched by exactly 0, 1 or 2 units.
With this rework this is replaced by a single hashmap which is primarily
keyed by the PID and points to a Unit interested in it. However, it
optionally also keyed by the negated PID, in which case it points to a
NULL terminated array of additional Unit objects also interested. This
scheme means arbitrary numbers of Units may now watch the same PID.
Runtime and memory behaviour should not be impact by this change, as for
the common case (i.e. each PID only watched by a single unit) behaviour
stays the same, but for the uncommon case (a PID watched by more than
one unit) we only pay with a single additional memory allocation for the
array.
Why this all? Primarily, because allowing exactly two units to watch a
specific PID is not sufficient for some niche cases, as processes can
belong to more than one unit these days:
1. sd_notify() with MAINPID= can be used to attach a process from a
different cgroup to multiple units.
2. Similar, the PIDFile= setting in unit files can be used for similar
setups,
3. By creating a scope unit a main process of a service may join a
different unit, too.
4. On cgroupsv1 we frequently end up watching all processes remaining in
a scope, and if a process opens lots of scopes one after the other it
might thus end up being watch by many of them.
This patch hence removes the 2-unit-per-PID limit. It also makes a
couple of other changes, some of them quite relevant:
- manager_get_unit_by_pid() (and the bus call wrapping it) when there's
ambiguity will prefer returning the Unit the process belongs to based on
cgroup membership, and only check the watch-pids hashmap if that
fails. This change in logic is probably more in line with what people
expect and makes things more stable as each process can belong to
exactly one cgroup only.
- Every SIGCHLD event is now dispatched to all units interested in its
PID. Previously, there was some magic conditionalization: the SIGCHLD
would only be dispatched to the unit if it was only interested in a
single PID only, or the PID belonged to the control or main PID or we
didn't dispatch a signle SIGCHLD to the unit in the current event loop
iteration yet. These rules were quite arbitrary and also redundant as
the the per-unit handlers would filter the PIDs anyway a second time.
With this change we'll hence relax the rules: all we do now is
dispatch every SIGCHLD event exactly once to each unit interested in
it, and it's up to the unit to then use or ignore this. We use a
generation counter in the unit to ensure that we only invoke the unit
handler once for each event, protecting us from confusion if a unit is
both associated with a specific PID through cgroup membership and
through the "watch_pids" logic. It also protects us from being
confused if the "watch_pids" hashmap is altered while we are
dispatching to it (which is a very likely case).
- sd_notify() message dispatching has been reworked to be very similar
to SIGCHLD handling now. A generation counter is used for dispatching
as well.
This also adds a new test that validates that "watch_pid" registration
and unregstration works correctly.
2018-01-12 13:41:05 +01:00
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[libmount,
|
|
|
|
threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libblkid]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-hashmap.c',
|
|
|
|
'src/test/test-hashmap-plain.c',
|
|
|
|
test_hashmap_ordered_c],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'', 'timeout=90'],
|
|
|
|
|
|
|
|
[['src/test/test-set.c'],
|
2020-04-29 08:50:37 +02:00
|
|
|
[libbasic],
|
2017-04-18 01:25:00 +02:00
|
|
|
[]],
|
|
|
|
|
2019-02-20 22:12:48 +01:00
|
|
|
[['src/test/test-ordered-set.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-10-12 04:12:07 +02:00
|
|
|
[['src/test/test-set-disable-mempool.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-bitmap.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-xml.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-list.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-01-17 18:40:10 +01:00
|
|
|
[['src/test/test-procfs-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-unaligned.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-tables.c',
|
|
|
|
'src/shared/test-tables.h',
|
|
|
|
'src/journal/journald-server.c',
|
|
|
|
'src/journal/journald-server.h'],
|
|
|
|
[libcore,
|
|
|
|
libjournal_core,
|
2020-12-14 12:41:32 +01:00
|
|
|
libudevd_core,
|
2017-04-18 01:25:00 +02:00
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libseccomp,
|
|
|
|
libmount,
|
|
|
|
libxz,
|
|
|
|
liblz4,
|
|
|
|
libblkid],
|
2020-12-14 12:41:32 +01:00
|
|
|
'', '', [], libudevd_core_includes],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/test/test-prioq.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-fileio.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-10-18 11:27:23 +02:00
|
|
|
[['src/test/test-time-util.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-clock.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-architecture.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-log.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-ipcrm.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'', 'unsafe'],
|
|
|
|
|
|
|
|
[['src/test/test-btrfs.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'', 'manual'],
|
|
|
|
|
|
|
|
|
|
|
|
[['src/test/test-firewall-util.c'],
|
2017-04-26 22:14:23 +02:00
|
|
|
[libshared],
|
firewall-util: add nftables backend
Idea is to use a static ruleset, added when the first attempt to
add a masquerade or dnat rule is made.
The alternative would be to add the ruleset when the init function is called.
The disadvantage is that this enables connection tracking and NAT in the kernel
(as the ruleset needs this to work), which comes with some overhead that might
not be needed (no nspawn usage and no IPMasquerade option set).
There is no additional dependency on the 'nft' userspace binary or other libraries.
sd-netlinks nfnetlink backend is used to modify the nftables ruleset.
The commit message/comments still use nft syntax since that is what
users will see when they use the nft tool to list the ruleset.
The added initial skeleton (added on first fw_add_masquerade/local_dnat
call) looks like this:
table ip io.systemd.nat {
set masq_saddr {
type ipv4_addr
flags interval
elements = { 192.168.59.160/28 }
}
map map_port_ipport {
type inet_proto . inet_service : ipv4_addr . inet_service
elements = { tcp . 2222 : 192.168.59.169 . 22 }
}
chain prerouting {
type nat hook prerouting priority dstnat + 1; policy accept;
fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
}
chain output {
type nat hook output priority -99; policy accept;
ip daddr != 127.0.0.0/8 oif "lo" dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
}
chain postrouting {
type nat hook postrouting priority srcnat + 1; policy accept;
ip saddr @masq_saddr masquerade
}
}
Next calls to fw_add_masquerade/add_local_dnat will then only add/delete the
element/mapping to masq_saddr and map_port_ipport, i.e. the ruleset doesn't
change -- only the set/map content does.
Running test-firewall-util with this backend gives following output
on a parallel 'nft monitor':
$ nft monitor
add table ip io.systemd.nat
add chain ip io.systemd.nat prerouting { type nat hook prerouting priority dstnat + 1; policy accept; }
add chain ip io.systemd.nat output { type nat hook output priority -99; policy accept; }
add chain ip io.systemd.nat postrouting { type nat hook postrouting priority srcnat + 1; policy accept; }
add set ip io.systemd.nat masq_saddr { type ipv4_addr; flags interval; }
add map ip io.systemd.nat map_port_ipport { type inet_proto . inet_service : ipv4_addr . inet_service; }
add rule ip io.systemd.nat prerouting fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
add rule ip io.systemd.nat output ip daddr != 127.0.0.0/8 fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
add rule ip io.systemd.nat postrouting ip saddr @masq_saddr masquerade
add element ip io.systemd.nat masq_saddr { 10.1.2.3 }
add element ip io.systemd.nat masq_saddr { 10.0.2.0/28 }
delete element ip io.systemd.nat masq_saddr { 10.0.2.0/28 }
delete element ip io.systemd.nat masq_saddr { 10.1.2.3 }
add element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.4 . 815 }
delete element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.4 . 815 }
add element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.5 . 815 }
delete element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.5 . 815 }
CTRL-C
Things not implemented/supported:
1. Change monitoring. The kernel allows userspace to learn about changes
made by other clients (using nfnetlink notifications). It would be
possible to detect when e.g. someone removes the systemd nat table.
This would need more work. Its also not clear on how to react to
external changes -- it doesn't seem like a good idea to just auto-undo
everthing.
2. 'set masq_saddr' doesn't handle overlaps.
Example:
fw_add_masquerade(true, AF_INET, "10.0.0.0" , 16);
fw_add_masquerade(true, AF_INET, "10.0.0.0" , 8); /* fails */
With the iptables backend the second call works, as it adds an
independent iptables rule.
With the nftables backend, the range 10.0.0.0-10.255.255.255 clashes with
the existing range of 10.0.0.0-10.0.255.255 so 2nd add gets rejected by the
kernel.
This will generate an error message from networkd ("Could not enable IP
masquerading: File exists").
To resolve this it would be needed to either keep track of the added elements
and perform range merging when overlaps are detected.
However, the add erquests are done using the configured network on a
device, so no overlaps should occur in normal setups.
IPv6 support is added in a extra changeset.
Fixes: #13307
2020-06-19 15:53:03 +02:00
|
|
|
[]],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/test/test-netlink-manual.c'],
|
|
|
|
[],
|
|
|
|
[libkmod],
|
|
|
|
'HAVE_KMOD', 'manual'],
|
|
|
|
|
|
|
|
[['src/test/test-ellipsize.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-date.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-sleep.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-replace-var.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-calendarspec.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-strip-tab-ansi.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-04-04 15:02:12 +02:00
|
|
|
[['src/test/test-coredump-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-daemon.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-cgroup.c'],
|
|
|
|
[],
|
2020-03-10 11:22:11 +01:00
|
|
|
[]],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
2018-11-02 17:21:57 +01:00
|
|
|
[['src/test/test-cgroup-cpu.c'],
|
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-cgroup-unit-default.c'],
|
cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow
In cgroup v2 we have protection tunables -- currently MemoryLow and
MemoryMin (there will be more in future for other resources, too). The
design of these protection tunables requires not only intermediate
cgroups to propagate protections, but also the units at the leaf of that
resource's operation to accept it (by setting MemoryLow or MemoryMin).
This makes sense from an low-level API design perspective, but it's a
good idea to also have a higher-level abstraction that can, by default,
propagate these resources to children recursively. In this patch, this
happens by having descendants set memory.low to N if their ancestor has
DefaultMemoryLow=N -- assuming they don't set a separate MemoryLow
value.
Any affected unit can opt out of this propagation by manually setting
`MemoryLow` to some value in its unit configuration. A unit can also
stop further propagation by setting `DefaultMemoryLow=` with no
argument. This removes further propagation in the subtree, but has no
effect on the unit itself (for that, use `MemoryLow=0`).
Our use case in production is simplifying the configuration of machines
which heavily rely on memory protection tunables, but currently require
tweaking a huge number of unit files to make that a reality. This
directive makes that significantly less fragile, and decreases the risk
of misconfiguration.
After this patch is merged, I will implement DefaultMemoryMin= using the
same principles.
2019-03-28 13:50:50 +01:00
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-cgroup-mask.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid]],
|
|
|
|
|
2019-04-11 18:47:10 +02:00
|
|
|
[['src/test/test-varlink.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-cgroup-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-08-01 13:14:45 +02:00
|
|
|
[['src/test/test-cgroup-setup.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-07-04 16:06:30 +02:00
|
|
|
[['src/test/test-env-file.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-env-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-strbuf.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-strv.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-path-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-07-23 15:24:54 +02:00
|
|
|
[['src/test/test-rm-rf.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-07-18 13:16:57 +02:00
|
|
|
[['src/test/test-chase-symlinks.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'', 'manual'],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-path.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
2020-07-22 12:12:36 +02:00
|
|
|
libblkid],
|
|
|
|
'', 'timeout=120'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-execute.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
2018-04-11 16:50:48 +02:00
|
|
|
libblkid],
|
|
|
|
'', 'timeout=360'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/test/test-siphash24.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-strxcpyx.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-install.c'],
|
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[],
|
|
|
|
'', 'manual'],
|
|
|
|
|
|
|
|
[['src/test/test-watchdog.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-11-08 16:55:28 +01:00
|
|
|
[['src/test/test-sched-prio.c'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[libcore,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid]],
|
|
|
|
|
|
|
|
[['src/test/test-conf-files.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-conf-parser.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-af-list.c',
|
|
|
|
generated_gperf_headers],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-arphrd-list.c',
|
|
|
|
generated_gperf_headers],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-11-29 16:28:33 +01:00
|
|
|
[['src/test/test-ip-protocol-list.c',
|
|
|
|
shared_generated_gperf_headers],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-journal-importer.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-libudev.c'],
|
2020-12-14 12:41:32 +01:00
|
|
|
[libshared,
|
|
|
|
libudev_static],
|
|
|
|
[],
|
|
|
|
'', '', [], libudev_includes],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/test/test-udev.c'],
|
2020-12-14 12:41:32 +01:00
|
|
|
[libudevd_core,
|
2017-04-18 01:25:00 +02:00
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libblkid,
|
|
|
|
libkmod,
|
2020-09-03 16:53:22 +02:00
|
|
|
libacl,
|
|
|
|
libselinux],
|
2018-09-21 10:10:34 +02:00
|
|
|
'', 'manual', '-DLOG_REALM=LOG_REALM_UDEV'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
2020-10-20 18:38:44 +02:00
|
|
|
[['src/test/test-udev-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-id128.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/test/test-hash.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2018-02-05 09:48:38 +01:00
|
|
|
[['src/test/test-gcrypt-util.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'HAVE_GCRYPT'],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/test/test-nss.c'],
|
|
|
|
[],
|
|
|
|
[libdl],
|
2018-07-18 02:25:57 +02:00
|
|
|
'ENABLE_NSS', 'manual'],
|
2018-03-14 11:03:36 +01:00
|
|
|
|
|
|
|
[['src/test/test-umount.c',
|
2019-03-05 12:12:33 +01:00
|
|
|
'src/shutdown/umount.c',
|
|
|
|
'src/shutdown/umount.h'],
|
2019-03-05 16:19:40 +01:00
|
|
|
[libcore_shared,
|
|
|
|
libshared],
|
2018-03-14 11:03:36 +01:00
|
|
|
[libmount]],
|
2018-06-04 15:15:17 +02:00
|
|
|
|
|
|
|
[['src/test/test-bus-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2018-09-30 20:34:11 +02:00
|
|
|
|
|
|
|
[['src/test/test-sd-hwdb.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2019-07-23 14:22:06 +02:00
|
|
|
|
2020-03-23 19:12:55 +01:00
|
|
|
[['src/test/test-sd-path.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2019-07-23 14:22:06 +02:00
|
|
|
[['src/test/test-local-addresses.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2020-03-08 02:58:33 +01:00
|
|
|
|
|
|
|
[['src/test/test-psi-util.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2020-10-25 12:20:38 +01:00
|
|
|
|
|
|
|
[['src/test/test-qrcode-util.c'],
|
|
|
|
[libshared],
|
|
|
|
[libdl]],
|
2017-04-18 01:25:00 +02:00
|
|
|
]
|
2017-04-07 06:19:09 +02:00
|
|
|
|
2020-12-07 08:45:15 +01:00
|
|
|
if conf.get('ENABLE_NSCD') == 1
|
|
|
|
tests += [
|
|
|
|
[['src/test/test-nscd-flush.c'],
|
|
|
|
[libcore,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
librt,
|
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
|
|
|
libmount,
|
|
|
|
libblkid],
|
|
|
|
'', 'manual']]
|
|
|
|
endif
|
|
|
|
|
2017-04-07 06:19:09 +02:00
|
|
|
############################################################
|
|
|
|
|
|
|
|
# define some tests here, because the link_with deps were not defined earlier
|
|
|
|
|
|
|
|
tests += [
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/journal/test-journal.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-journal-send.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-journal-syslog.c'],
|
|
|
|
[libjournal_core,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4,
|
|
|
|
libselinux]],
|
|
|
|
|
|
|
|
[['src/journal/test-journal-match.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-journal-enum.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
2017-11-26 13:18:45 +01:00
|
|
|
liblz4],
|
|
|
|
'', 'timeout=360'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/journal/test-journal-stream.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-journal-flush.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-journal-init.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
2018-02-27 18:37:23 +01:00
|
|
|
[['src/journal/test-journal-config.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[libxz,
|
|
|
|
liblz4,
|
|
|
|
libselinux]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/journal/test-journal-verify.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-journal-interleaving.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-mmap-cache.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
|
|
|
liblz4]],
|
|
|
|
|
|
|
|
[['src/journal/test-catalog.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[threads,
|
|
|
|
libxz,
|
2018-09-12 09:23:40 +02:00
|
|
|
liblz4]],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/journal/test-compress.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[liblz4,
|
2020-04-12 01:09:05 +02:00
|
|
|
libzstd,
|
2017-04-18 01:25:00 +02:00
|
|
|
libxz]],
|
|
|
|
|
|
|
|
[['src/journal/test-compress-benchmark.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[liblz4,
|
2020-04-12 01:09:05 +02:00
|
|
|
libzstd,
|
2017-04-18 01:25:00 +02:00
|
|
|
libxz],
|
|
|
|
'', 'timeout=90'],
|
|
|
|
|
|
|
|
[['src/journal/test-audit-type.c'],
|
|
|
|
[libjournal_core,
|
|
|
|
libshared],
|
|
|
|
[liblz4,
|
|
|
|
libxz]],
|
|
|
|
]
|
2017-04-09 20:08:53 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
tests += [
|
2018-08-06 13:16:29 +02:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-address.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-marshal.c'],
|
|
|
|
[],
|
|
|
|
[threads,
|
|
|
|
libglib,
|
|
|
|
libgobject,
|
|
|
|
libgio,
|
|
|
|
libdbus]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-signature.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
2019-01-17 19:45:12 +01:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-queue-ref-cycle.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
2017-12-15 22:24:52 +01:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-watch-bind.c'],
|
|
|
|
[],
|
|
|
|
[threads], '', 'timeout=120'],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-chat.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-cleanup.c'],
|
|
|
|
[],
|
|
|
|
[threads,
|
|
|
|
libseccomp]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-error.c'],
|
|
|
|
[libshared_static,
|
2017-12-19 11:35:01 +01:00
|
|
|
libsystemd_static],
|
2017-04-18 01:25:00 +02:00
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-track.c'],
|
|
|
|
[],
|
|
|
|
[libseccomp]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-server.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-objects.c'],
|
|
|
|
[],
|
|
|
|
[threads]],
|
|
|
|
|
2019-04-19 13:30:09 +02:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-vtable.c',
|
|
|
|
'src/libsystemd/sd-bus/test-vtable-data.h'],
|
2017-05-13 19:23:28 +02:00
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-gvariant.c'],
|
|
|
|
[],
|
|
|
|
[libglib,
|
|
|
|
libgobject,
|
|
|
|
libgio]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-creds.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-match.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-benchmark.c'],
|
|
|
|
[],
|
2017-07-23 17:45:57 +02:00
|
|
|
[threads],
|
|
|
|
'', 'manual'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
2019-04-19 13:30:09 +02:00
|
|
|
[['src/libsystemd/sd-bus/test-bus-introspect.c',
|
|
|
|
'src/libsystemd/sd-bus/test-vtable-data.h'],
|
2017-04-18 01:25:00 +02:00
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-event/test-event.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-netlink/test-netlink.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd/sd-resolve/test-resolve.c'],
|
|
|
|
[],
|
2019-01-27 18:43:41 +01:00
|
|
|
[threads],
|
|
|
|
'', 'timeout=120'],
|
2017-04-18 01:25:00 +02:00
|
|
|
|
|
|
|
[['src/libsystemd/sd-login/test-login.c'],
|
|
|
|
[],
|
2017-05-12 20:25:17 +02:00
|
|
|
[]],
|
2018-09-28 13:52:48 +02:00
|
|
|
|
|
|
|
[['src/libsystemd/sd-device/test-sd-device.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
2018-10-12 04:45:20 +02:00
|
|
|
|
|
|
|
[['src/libsystemd/sd-device/test-sd-device-thread.c'],
|
|
|
|
[libbasic,
|
|
|
|
libshared_static,
|
|
|
|
libsystemd],
|
|
|
|
[threads]],
|
2018-10-12 04:56:45 +02:00
|
|
|
|
|
|
|
[['src/libsystemd/sd-device/test-udev-device-thread.c'],
|
|
|
|
[libbasic,
|
|
|
|
libshared_static,
|
|
|
|
libudev],
|
2020-12-14 12:41:32 +01:00
|
|
|
[threads],
|
|
|
|
'', '', [], libudev_includes],
|
2018-10-19 04:58:25 +02:00
|
|
|
|
|
|
|
[['src/libsystemd/sd-device/test-sd-device-monitor.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2017-04-10 23:11:10 +02:00
|
|
|
]
|
2017-04-07 06:19:09 +02:00
|
|
|
|
2020-03-30 08:42:19 +02:00
|
|
|
if cxx_cmd != ''
|
2017-05-13 19:23:28 +02:00
|
|
|
tests += [
|
|
|
|
[['src/libsystemd/sd-bus/test-bus-vtable-cc.cc'],
|
|
|
|
[],
|
|
|
|
[]]
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2017-04-07 06:19:09 +02:00
|
|
|
############################################################
|
|
|
|
|
|
|
|
tests += [
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/libsystemd-network/test-dhcp-option.c',
|
|
|
|
'src/libsystemd-network/dhcp-protocol.h',
|
|
|
|
'src/libsystemd-network/dhcp-internal.h'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[]],
|
|
|
|
|
2017-05-13 16:19:32 +02:00
|
|
|
[['src/libsystemd-network/test-sd-dhcp-lease.c',
|
|
|
|
'src/libsystemd-network/dhcp-lease-internal.h'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/libsystemd-network/test-dhcp-client.c',
|
|
|
|
'src/libsystemd-network/dhcp-protocol.h',
|
|
|
|
'src/libsystemd-network/dhcp-internal.h',
|
|
|
|
'src/systemd/sd-dhcp-client.h'],
|
|
|
|
[libshared,
|
2017-04-25 20:19:54 +02:00
|
|
|
libsystemd_network],
|
2017-04-18 01:25:00 +02:00
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd-network/test-dhcp-server.c'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd-network/test-ipv4ll.c',
|
|
|
|
'src/libsystemd-network/arp-util.h',
|
|
|
|
'src/systemd/sd-ipv4ll.h'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd-network/test-ipv4ll-manual.c',
|
|
|
|
'src/systemd/sd-ipv4ll.h'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[],
|
|
|
|
'', 'manual'],
|
|
|
|
|
|
|
|
[['src/libsystemd-network/test-acd.c',
|
|
|
|
'src/systemd/sd-ipv4acd.h'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[],
|
|
|
|
'', 'manual'],
|
|
|
|
|
|
|
|
[['src/libsystemd-network/test-ndisc-rs.c',
|
|
|
|
'src/libsystemd-network/dhcp-identifier.h',
|
|
|
|
'src/libsystemd-network/dhcp-identifier.c',
|
|
|
|
'src/libsystemd-network/icmp6-util.h',
|
|
|
|
'src/systemd/sd-dhcp6-client.h',
|
|
|
|
'src/systemd/sd-ndisc.h'],
|
|
|
|
[libshared,
|
2017-04-25 20:19:54 +02:00
|
|
|
libsystemd_network],
|
2017-04-18 01:25:00 +02:00
|
|
|
[]],
|
|
|
|
|
2017-05-11 15:19:21 +02:00
|
|
|
[['src/libsystemd-network/test-ndisc-ra.c',
|
|
|
|
'src/libsystemd-network/icmp6-util.h',
|
|
|
|
'src/systemd/sd-ndisc.h'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/libsystemd-network/test-dhcp6-client.c',
|
|
|
|
'src/libsystemd-network/dhcp-identifier.h',
|
|
|
|
'src/libsystemd-network/dhcp-identifier.c',
|
|
|
|
'src/libsystemd-network/dhcp6-internal.h',
|
|
|
|
'src/systemd/sd-dhcp6-client.h'],
|
|
|
|
[libshared,
|
2017-04-25 20:19:54 +02:00
|
|
|
libsystemd_network],
|
2017-04-18 01:25:00 +02:00
|
|
|
[]],
|
|
|
|
|
|
|
|
[['src/libsystemd-network/test-lldp.c'],
|
|
|
|
[libshared,
|
|
|
|
libsystemd_network],
|
|
|
|
[]],
|
|
|
|
]
|
2017-04-07 06:19:09 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
tests += [
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/login/test-login-shared.c'],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
|
2020-04-07 23:38:16 +02:00
|
|
|
[['src/analyze/test-verify.c', 'src/analyze/analyze-verify.c', 'src/analyze/analyze-verify.h'],
|
|
|
|
[libcore, libshared],
|
|
|
|
[]],
|
|
|
|
|
2017-04-18 01:25:00 +02:00
|
|
|
[['src/login/test-inhibit.c'],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
'', 'manual'],
|
|
|
|
|
|
|
|
[['src/login/test-login-tables.c'],
|
|
|
|
[liblogind_core,
|
2017-04-25 20:19:54 +02:00
|
|
|
libshared],
|
2017-04-18 01:25:00 +02:00
|
|
|
[threads]],
|
|
|
|
]
|
2020-03-30 18:14:56 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
tests += [
|
|
|
|
[['src/test/test-xdg-autostart.c',
|
|
|
|
'src/xdg-autostart-generator/xdg-autostart-service.c',
|
|
|
|
'src/xdg-autostart-generator/xdg-autostart-service.h',],
|
|
|
|
[],
|
|
|
|
[]],
|
|
|
|
]
|