2020-11-09 13:23:58 +09:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-18 18:32:01 +01:00
|
|
|
|
2017-04-07 00:19:09 -04:00
|
|
|
awkscript = 'test-hashmap-ordered.awk'
|
|
|
|
|
test_hashmap_ordered_c = custom_target(
|
2017-04-17 19:25:00 -04:00
|
|
|
input : [awkscript, 'test-hashmap-plain.c'],
|
|
|
|
|
output : 'test-hashmap-ordered.c',
|
|
|
|
|
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
2018-09-12 21:47:56 +09:00
|
|
|
capture : true,
|
|
|
|
|
build_by_default : want_tests != 'false')
|
2017-04-07 00:19:09 -04:00
|
|
|
|
2025-04-24 11:58:45 +02:00
|
|
|
generated_sources += test_hashmap_ordered_c
|
|
|
|
|
|
2022-01-11 10:56:22 +01:00
|
|
|
path = run_command(sh, '-c', 'echo "$PATH"', check: true).stdout().strip()
|
2025-07-14 11:54:00 +02:00
|
|
|
test_env = {
|
|
|
|
|
'PATH' : meson.project_build_root() + ':' + path,
|
|
|
|
|
'PROJECT_BUILD_ROOT' : meson.project_build_root(),
|
2025-09-28 03:54:00 +09:00
|
|
|
'SYSTEMD_DEFAULT_LOCALE' : get_option('default-locale'),
|
2025-07-14 11:54:00 +02:00
|
|
|
'SYSTEMD_SLOW_TESTS' : want_slow_tests ? '1' : '0',
|
|
|
|
|
'PYTHONDONTWRITEBYTECODE' : '1',
|
2025-09-09 13:34:31 +09:00
|
|
|
'SYSTEMD_LIBC' : get_option('libc'),
|
2025-07-14 11:54:00 +02:00
|
|
|
}
|
2025-07-05 20:21:00 +01:00
|
|
|
if conf.get('ENABLE_LOCALED') == 1
|
2025-07-14 11:54:00 +02:00
|
|
|
test_env += {'SYSTEMD_LANGUAGE_FALLBACK_MAP' : language_fallback_map}
|
2023-06-06 13:03:41 +02:00
|
|
|
endif
|
|
|
|
|
|
2017-04-10 14:13:40 -04:00
|
|
|
############################################################
|
|
|
|
|
|
2025-07-25 12:18:19 +02:00
|
|
|
generate_sym_test_py = files('generate-sym-test.py')
|
2017-04-10 14:13:40 -04:00
|
|
|
|
|
|
|
|
test_libsystemd_sym_c = custom_target(
|
2025-07-25 12:18:19 +02:00
|
|
|
input : [libsystemd_sym_path,
|
|
|
|
|
systemd_headers,
|
|
|
|
|
libsystemd_sources],
|
2017-04-17 19:25:00 -04:00
|
|
|
output : 'test-libsystemd-sym.c',
|
2025-07-25 12:18:19 +02:00
|
|
|
command : [generate_sym_test_py,
|
|
|
|
|
libsystemd_sym_path,
|
|
|
|
|
libsystemd_dir_path,
|
|
|
|
|
systemd_headers],
|
2018-09-12 21:47:56 +09:00
|
|
|
capture : true,
|
|
|
|
|
build_by_default : want_tests != 'false')
|
2017-04-10 14:13:40 -04:00
|
|
|
|
2017-04-10 15:20:42 -04:00
|
|
|
test_libudev_sym_c = custom_target(
|
2025-07-25 12:18:19 +02:00
|
|
|
input : [libudev_sym_path,
|
|
|
|
|
libudev_h_path,
|
|
|
|
|
libudev_sources],
|
2017-04-17 19:25:00 -04:00
|
|
|
output : 'test-libudev-sym.c',
|
2025-07-25 12:18:19 +02:00
|
|
|
command : [generate_sym_test_py,
|
|
|
|
|
libudev_sym_path,
|
|
|
|
|
libudev_dir_path,
|
|
|
|
|
libudev_h_path],
|
2018-09-12 21:47:56 +09:00
|
|
|
capture : true,
|
|
|
|
|
build_by_default : want_tests != 'false')
|
2017-04-10 15:20:42 -04:00
|
|
|
|
2025-04-24 11:58:45 +02:00
|
|
|
generated_sources += [test_libsystemd_sym_c, test_libudev_sym_c]
|
|
|
|
|
|
2017-04-10 14:13:40 -04:00
|
|
|
############################################################
|
|
|
|
|
|
2023-01-27 12:57:35 +01:00
|
|
|
simple_tests += files(
|
|
|
|
|
'test-alloc-util.c',
|
|
|
|
|
'test-architecture.c',
|
|
|
|
|
'test-argv-util.c',
|
2024-11-07 14:48:57 +01:00
|
|
|
'test-audit-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-barrier.c',
|
2025-04-03 02:50:12 +01:00
|
|
|
'test-binfmt-util.c',
|
2023-02-02 16:00:11 -05:00
|
|
|
'test-bitfield.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-bitmap.c',
|
|
|
|
|
'test-blockdev-util.c',
|
|
|
|
|
'test-bootspec.c',
|
basic: add "build path" logic
We have a number of components these days that are split into multiple
binaries, i.e. a primary one, and a worker callout usually. These
binaries are closely related, they typically speak a protocol that is
internal, and not safe to mix and match. Examples for this:
- homed and its worker binary homework
- userdbd and its worker binary userwork
- import and the various pull/import/export handlers
- sysupdate the same
- the service manager and the executor binary
Running any of these daemons directly from the meson build tree is
messy, since the implementations will typically invoke the installed
callout binaries, not the ones from the build tree. This is very
annoying, and not obvious at first.
Now, we could always invoke relevant binaries from $(dirname
/proc/self/exe) first, before using the OS installed ones. But that's
typically not what is desired, because this means in the installed case
(i.e. the usual one) we'll look for these callout binaries at a place
they typically will not be found (because these callouts generally are
located in libexecdir, not bindir when installed).
Hence, let's try to do things a bit smarter, and follow what build
systems such as meson have already been doing to make sure dynamic
library discovery works correctly when binaries are run from a build
directory: let's start looking at rpath/runpath in the main binary that
is executed: if there's an rpath/runpath set, then we'll look for the
callout binaries next to the main binary, otherwise we won't. This
should generally be the right thing to do as meson strips the rpath
during installation, and thus we'll look for the callouts in the build
dir if in build dir mode, and in the OS otherwise.
2024-02-20 11:30:27 +01:00
|
|
|
'test-build-path.c',
|
2025-05-29 14:37:30 +02:00
|
|
|
'test-bus-unit-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-bus-util.c',
|
|
|
|
|
'test-calendarspec.c',
|
2025-10-23 23:40:59 +09:00
|
|
|
'test-capability-list.c',
|
|
|
|
|
'test-capability-util.c',
|
2025-08-30 21:59:44 +09:00
|
|
|
'test-cgroup-setup.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-cgroup-util.c',
|
2023-03-30 12:15:28 +09:00
|
|
|
'test-chase.c',
|
2024-11-06 23:06:32 +03:00
|
|
|
'test-chid.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-clock.c',
|
2023-12-20 12:08:32 +01:00
|
|
|
'test-color-util.c',
|
2023-03-19 16:11:15 +00:00
|
|
|
'test-compare-operator.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-condition.c',
|
|
|
|
|
'test-conf-files.c',
|
|
|
|
|
'test-conf-parser.c',
|
|
|
|
|
'test-copy.c',
|
|
|
|
|
'test-coredump-util.c',
|
|
|
|
|
'test-cpu-set-util.c',
|
|
|
|
|
'test-creds.c',
|
|
|
|
|
'test-daemon.c',
|
|
|
|
|
'test-data-fd-util.c',
|
|
|
|
|
'test-date.c',
|
|
|
|
|
'test-dev-setup.c',
|
|
|
|
|
'test-device-nodes.c',
|
|
|
|
|
'test-devnum-util.c',
|
2024-03-10 17:28:58 +05:30
|
|
|
'test-dirent-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-dns-domain.c',
|
|
|
|
|
'test-ellipsize.c',
|
|
|
|
|
'test-env-file.c',
|
|
|
|
|
'test-env-util.c',
|
|
|
|
|
'test-errno-util.c',
|
|
|
|
|
'test-escape.c',
|
|
|
|
|
'test-ether-addr-util.c',
|
|
|
|
|
'test-exec-util.c',
|
|
|
|
|
'test-execve.c',
|
|
|
|
|
'test-exit-status.c',
|
|
|
|
|
'test-extract-word.c',
|
|
|
|
|
'test-fdset.c',
|
2023-09-27 21:35:45 +08:00
|
|
|
'test-fiemap.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-fileio.c',
|
|
|
|
|
'test-firewall-util.c',
|
|
|
|
|
'test-format-table.c',
|
|
|
|
|
'test-format-util.c',
|
|
|
|
|
'test-fs-util.c',
|
|
|
|
|
'test-fstab-util.c',
|
|
|
|
|
'test-glob-util.c',
|
|
|
|
|
'test-gpt.c',
|
2023-06-23 17:24:11 -06:00
|
|
|
'test-gunicode.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-hash-funcs.c',
|
|
|
|
|
'test-hexdecoct.c',
|
|
|
|
|
'test-hmac.c',
|
|
|
|
|
'test-hostname-setup.c',
|
|
|
|
|
'test-hostname-util.c',
|
|
|
|
|
'test-id128.c',
|
2025-03-18 16:46:27 +01:00
|
|
|
'test-image-filter.c',
|
2022-11-30 18:39:45 +01:00
|
|
|
'test-image-policy.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-import-util.c',
|
|
|
|
|
'test-in-addr-prefix-util.c',
|
|
|
|
|
'test-in-addr-util.c',
|
|
|
|
|
'test-install-file.c',
|
|
|
|
|
'test-install-root.c',
|
|
|
|
|
'test-io-util.c',
|
2024-01-05 11:34:34 +01:00
|
|
|
'test-iovec-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-journal-importer.c',
|
|
|
|
|
'test-kbd-util.c',
|
2024-03-13 16:47:28 +01:00
|
|
|
'test-label.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-limits-util.c',
|
|
|
|
|
'test-list.c',
|
|
|
|
|
'test-local-addresses.c',
|
|
|
|
|
'test-locale-util.c',
|
2023-03-09 12:59:09 +01:00
|
|
|
'test-lock-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-log.c',
|
|
|
|
|
'test-logarithm.c',
|
2024-03-08 17:11:14 +05:30
|
|
|
'test-login-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-macro.c',
|
2023-05-16 18:59:25 +09:00
|
|
|
'test-memfd-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-memory-util.c',
|
|
|
|
|
'test-mempool.c',
|
2023-05-26 15:22:03 +09:00
|
|
|
'test-memstream-util.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-mkdir.c',
|
|
|
|
|
'test-modhex.c',
|
|
|
|
|
'test-mountpoint-util.c',
|
|
|
|
|
'test-net-naming-scheme.c',
|
2025-03-27 11:10:15 +09:00
|
|
|
'test-notify-recv.c',
|
2025-03-11 06:06:40 +01:00
|
|
|
'test-nsresource.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-nulstr-util.c',
|
|
|
|
|
'test-open-file.c',
|
|
|
|
|
'test-ordered-set.c',
|
|
|
|
|
'test-os-util.c',
|
2024-11-18 11:45:59 +01:00
|
|
|
'test-osc-context.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-parse-argument.c',
|
|
|
|
|
'test-parse-helpers.c',
|
|
|
|
|
'test-path-lookup.c',
|
|
|
|
|
'test-path-util.c',
|
|
|
|
|
'test-percent-util.c',
|
2024-01-23 19:23:37 +09:00
|
|
|
'test-pidref.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-pretty-print.c',
|
|
|
|
|
'test-prioq.c',
|
|
|
|
|
'test-proc-cmdline.c',
|
|
|
|
|
'test-procfs-util.c',
|
|
|
|
|
'test-psi-util.c',
|
|
|
|
|
'test-ratelimit.c',
|
|
|
|
|
'test-raw-clone.c',
|
2024-03-18 12:12:32 +01:00
|
|
|
'test-recovery-key.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-recurse-dir.c',
|
|
|
|
|
'test-replace-var.c',
|
|
|
|
|
'test-rlimit-util.c',
|
|
|
|
|
'test-rm-rf.c',
|
|
|
|
|
'test-sd-hwdb.c',
|
|
|
|
|
'test-sd-path.c',
|
2023-04-15 19:12:45 +02:00
|
|
|
'test-secure-bits.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-serialize.c',
|
|
|
|
|
'test-set.c',
|
2024-10-11 16:30:43 +03:00
|
|
|
'test-sha1.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-sha256.c',
|
|
|
|
|
'test-sigbus.c',
|
|
|
|
|
'test-signal-util.c',
|
|
|
|
|
'test-siphash24.c',
|
2023-09-27 21:35:45 +08:00
|
|
|
'test-sleep-config.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-socket-netlink.c',
|
|
|
|
|
'test-socket-util.c',
|
|
|
|
|
'test-specifier.c',
|
|
|
|
|
'test-stat-util.c',
|
|
|
|
|
'test-static-destruct.c',
|
|
|
|
|
'test-strbuf.c',
|
|
|
|
|
'test-string-util.c',
|
|
|
|
|
'test-strip-tab-ansi.c',
|
|
|
|
|
'test-strv.c',
|
|
|
|
|
'test-strxcpyx.c',
|
|
|
|
|
'test-sysctl-util.c',
|
|
|
|
|
'test-terminal-util.c',
|
2025-06-29 22:15:29 +02:00
|
|
|
'test-tests.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-tmpfile-util.c',
|
|
|
|
|
'test-udev-util.c',
|
2024-01-09 10:37:27 +01:00
|
|
|
'test-uid-classification.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-uid-range.c',
|
|
|
|
|
'test-umask-util.c',
|
|
|
|
|
'test-unaligned.c',
|
|
|
|
|
'test-unit-file.c',
|
2024-04-24 19:41:03 -04:00
|
|
|
'test-user-record.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-user-util.c',
|
|
|
|
|
'test-utf8.c',
|
|
|
|
|
'test-verbs.c',
|
shared: add new "vpick" concept for ".v/" directories that contain versioned resources
This adds a new concept for handling paths. At appropriate places, if a
path such as /foo/bar/baz.v/ is specified, we'll
automatically enumerate all entries in /foo/bar/baz.v/baz* and then
do a version sort and pick the newest file.
A slightly more complex syntax is available, too:
/foo/bar/baz.v/quux___waldo
if that's used, then we'll look for all files matching
/foo/bar/baz.v/quux*waldo, and split out the middle, and version sort
it, and pick the nwest.
The ___ wildcard indicates both a version string, and if needed an
architecture ID, in case per-arch entries shall be supported.
This is a very simple way to maintain versioned resources in a dir, and
make systemd's components automatically pick the newest. Example:
/srv/myimages.v/foobar_1.32.65_x86-64.raw
/srv/myimages.v/foobar_1.33.45_x86-64.raw
/srv/myimages.v/foobar_1.31.5_x86-64.raw
/srv/myimages.v/foobar_1.31.5_arm64.raw
If now nspawn is invoked like this:
systemd-nspawn --image=/srv/myimages.v/foobar___.raw
Then it will automatically pick
/srv/myimages.v/foobar_1.33.45_x86-64.raw as the version to boot on
x86-64, and /srv/myimages.v/foobar_1.31.5_arm64.raw on arm64.
This commit only adds the basic implementation for picking files from a
dir, but no hook-up anywhere.
2023-03-03 18:18:05 +01:00
|
|
|
'test-vpick.c',
|
2023-01-27 12:57:35 +01:00
|
|
|
'test-web-util.c',
|
|
|
|
|
'test-xattr-util.c',
|
|
|
|
|
'test-xml.c',
|
|
|
|
|
)
|
2017-04-17 19:25:00 -04:00
|
|
|
|
2023-01-27 12:57:35 +01:00
|
|
|
############################################################
|
2021-06-29 15:27:12 +02:00
|
|
|
|
2023-01-25 17:19:52 +01:00
|
|
|
common_test_dependencies = [
|
2025-09-24 22:36:30 +02:00
|
|
|
libmount_cflags,
|
2023-01-25 17:19:52 +01:00
|
|
|
librt,
|
2025-09-08 17:17:05 +02:00
|
|
|
libseccomp_cflags,
|
2025-09-08 18:31:49 +02:00
|
|
|
libselinux_cflags,
|
2023-01-25 17:19:52 +01:00
|
|
|
threads,
|
|
|
|
|
]
|
2017-04-07 00:19:09 -04:00
|
|
|
|
2023-06-26 08:52:26 +09:00
|
|
|
executables += [
|
|
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-acl-util.c'),
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['HAVE_ACL'],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-03-09 10:35:05 +01:00
|
|
|
'sources' : files('test-af-list.c') +
|
|
|
|
|
generated_gperf_headers,
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2025-05-01 14:39:58 +02:00
|
|
|
'sources' : files('test-arphrd-util.c')
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-ask-password-api.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-async.c'),
|
|
|
|
|
'timeout' : 120,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-boot-timestamps.c'),
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['ENABLE_EFI'],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-btrfs.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-09-18 20:31:59 +08:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-btrfs-physical-offset.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-03-30 12:13:55 +09:00
|
|
|
'sources' : files('test-chase-manual.c'),
|
2023-01-25 17:19:52 +01:00
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-compress-benchmark.c'),
|
2024-02-27 21:28:14 +01:00
|
|
|
'link_with' : [libshared],
|
2023-01-25 17:19:52 +01:00
|
|
|
'timeout' : 90,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-compress.c'),
|
2024-02-27 21:28:14 +01:00
|
|
|
'link_with' : [libshared],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2025-10-09 23:08:19 +02:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-coredump-stacktrace.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
# This test intentionally crashes with SIGSEGV by dereferencing a NULL pointer
|
|
|
|
|
# to generate a coredump with a predictable stack trace. To prevent sanitizers
|
|
|
|
|
# from catching the error first let's disable them explicitly, and also always
|
|
|
|
|
# build with minimal optimizations to make the stack trace predictable no matter
|
|
|
|
|
# what we build the rest of systemd with
|
|
|
|
|
'override_options' : ['b_sanitize=none', 'strip=false', 'debug=true'],
|
|
|
|
|
'c_args' : ['-fno-sanitize=all', '-fno-optimize-sibling-calls', '-O1'],
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-cryptolib.c'),
|
2025-04-02 02:46:06 +09:00
|
|
|
'dependencies' : libopenssl,
|
|
|
|
|
'conditions' : ['HAVE_OPENSSL'],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2025-03-28 18:45:23 +01:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-display-quota.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-dlopen-so.c'),
|
2024-01-30 14:50:35 +01:00
|
|
|
'dependencies' : [
|
2025-09-08 19:17:40 +02:00
|
|
|
libblkid_cflags,
|
2024-01-30 14:50:35 +01:00
|
|
|
libkmod_cflags,
|
2025-09-24 22:36:30 +02:00
|
|
|
libmount_cflags,
|
2025-09-08 19:17:40 +02:00
|
|
|
libp11kit_cflags,
|
2025-09-08 17:17:05 +02:00
|
|
|
libseccomp_cflags,
|
2024-01-30 14:50:35 +01:00
|
|
|
],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
|
|
|
|
# only static linking apart from libdl, to make sure that the
|
|
|
|
|
# module is linked to all libraries that it uses.
|
|
|
|
|
'sources' : files('test-dlopen.c'),
|
2025-06-21 20:29:51 +09:00
|
|
|
'link_with' : [
|
|
|
|
|
libc_wrapper_static,
|
|
|
|
|
libbasic_static,
|
|
|
|
|
],
|
2023-06-26 08:52:26 +09:00
|
|
|
'dependencies' : libdl,
|
|
|
|
|
'install' : false,
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
|
|
|
|
test_template + {
|
2023-03-09 10:35:05 +01:00
|
|
|
'sources' : files('test-errno-list.c') +
|
|
|
|
|
generated_gperf_headers,
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-fd-util.c'),
|
2025-09-08 17:17:05 +02:00
|
|
|
'dependencies' : libseccomp_cflags,
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-03-09 10:35:05 +01:00
|
|
|
'sources' : files(
|
2023-06-26 08:52:26 +09:00
|
|
|
'test-hashmap.c',
|
|
|
|
|
'test-hashmap-plain.c',
|
|
|
|
|
) + [
|
|
|
|
|
test_hashmap_ordered_c,
|
|
|
|
|
],
|
2023-01-25 17:19:52 +01:00
|
|
|
'timeout' : 180,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2025-05-01 14:39:58 +02:00
|
|
|
'sources' : files('test-ip-protocol-list.c'),
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-ipcrm.c'),
|
|
|
|
|
'type' : 'unsafe',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-json.c'),
|
|
|
|
|
'dependencies' : libm,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-libcrypt-util.c'),
|
|
|
|
|
'dependencies' : libcrypt,
|
|
|
|
|
'timeout' : 120,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-libmount.c'),
|
|
|
|
|
'dependencies' : [
|
2025-09-24 22:36:30 +02:00
|
|
|
libmount_cflags,
|
2023-01-25 17:19:52 +01:00
|
|
|
threads,
|
|
|
|
|
],
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-loopback.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-math-util.c'),
|
|
|
|
|
'dependencies' : libm,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-02-10 13:29:58 +01:00
|
|
|
'sources' : files('test-mempress.c'),
|
|
|
|
|
'dependencies' : threads,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-05-16 15:41:48 +02:00
|
|
|
'sources' : files('test-mount-util.c'),
|
2025-09-24 22:36:30 +02:00
|
|
|
'dependencies' : libmount_cflags,
|
2023-05-16 15:41:48 +02:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-netlink-manual.c'),
|
2024-01-30 14:50:35 +01:00
|
|
|
'dependencies' : libkmod_cflags,
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['HAVE_KMOD'],
|
2023-01-25 17:19:52 +01:00
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
network: firewall integration with NFT sets
New directive `NFTSet=` provides a method for integrating network configuration
into firewall rules with NFT sets. The benefit of using this setting is that
static network configuration or dynamically obtained network addresses can be
used in firewall rules with the indirection of NFT set types. For example,
access could be granted for hosts in the local subnetwork only. Firewall rules
using IP address of an interface are also instantly updated when the network
configuration changes, for example via DHCP.
This option expects a whitespace separated list of NFT set definitions. Each
definition consists of a colon-separated tuple of source type (one of
"address", "prefix", or "ifindex"), NFT address family (one of "arp", "bridge",
"inet", "ip", "ip6", or "netdev"), table name and set name. The names of tables
and sets must conform to lexical restrictions of NFT table names. The type of
the element used in the NFT filter must match the type implied by the
directive ("address", "prefix" or "ifindex") and address type (IPv4 or IPv6)
as shown type implied by the directive ("address", "prefix" or "ifindex") and
address type (IPv4 or IPv6) must also match the set definition.
When an interface is configured with IP addresses, the addresses, subnetwork
masks or interface index will be appended to the NFT sets. The information will
be removed when the interface is deconfigured. systemd-networkd only inserts
elements to (or removes from) the sets, so the related NFT rules, tables and
sets must be prepared elsewhere in advance. Failures to manage the sets will be
ignored.
/etc/systemd/network/eth.network
```
[DHCPv4]
...
NFTSet=prefix:netdev:filter:eth_ipv4_prefix
```
Example NFT rules:
```
table netdev filter {
set eth_ipv4_prefix {
type ipv4_addr
flags interval
}
chain eth_ingress {
type filter hook ingress device "eth0" priority filter; policy drop;
ip saddr != @eth_ipv4_prefix drop
accept
}
}
```
```
$ sudo nft list set netdev filter eth_ipv4_prefix
table netdev filter {
set eth_ipv4_prefix {
type ipv4_addr
flags interval
elements = { 10.0.0.0/24 }
}
}
```
2023-08-09 23:07:21 +03:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-nft-set.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files(
|
|
|
|
|
'test-nss-hosts.c',
|
|
|
|
|
'nss-test-util.c',
|
|
|
|
|
),
|
2025-05-15 14:16:57 +02:00
|
|
|
'extract' : files('nss-test-util.c'),
|
2025-08-15 14:44:13 +09:00
|
|
|
'dependencies' : [
|
|
|
|
|
libdl,
|
2025-09-08 17:17:05 +02:00
|
|
|
libseccomp_cflags,
|
2025-08-15 14:44:13 +09:00
|
|
|
],
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['ENABLE_NSS'],
|
2023-01-25 17:19:52 +01:00
|
|
|
'timeout' : 120,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2025-05-15 14:16:57 +02:00
|
|
|
'sources' : files('test-nss-users.c'),
|
|
|
|
|
'objects' : ['test-nss-hosts'],
|
2023-01-25 17:19:52 +01:00
|
|
|
'dependencies' : libdl,
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['ENABLE_NSS'],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-07-06 11:21:29 -04:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-openssl.c'),
|
|
|
|
|
'dependencies' : libopenssl,
|
|
|
|
|
'conditions' : ['HAVE_OPENSSL'],
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-parse-util.c'),
|
|
|
|
|
'dependencies' : libm,
|
|
|
|
|
},
|
2024-11-11 20:58:30 +01:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-shift-uid.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-process-util.c'),
|
|
|
|
|
'dependencies' : threads,
|
|
|
|
|
},
|
2024-02-26 15:46:50 +01:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-progress-bar.c'),
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-qrcode-util.c'),
|
|
|
|
|
'dependencies' : libdl,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-random-util.c'),
|
|
|
|
|
'dependencies' : libm,
|
|
|
|
|
'timeout' : 120,
|
|
|
|
|
},
|
2025-10-20 12:36:29 +02:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-reread-partition-table.c'),
|
|
|
|
|
},
|
|
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-reread-partition-table-manual.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-sbat.c'),
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['ENABLE_BOOTLOADER'],
|
2025-10-03 15:26:20 +02:00
|
|
|
'c_args' : f'-I@efi_config_h_dir@',
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-seccomp.c'),
|
2025-09-08 17:17:05 +02:00
|
|
|
'dependencies' : libseccomp_cflags,
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['HAVE_SECCOMP'],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2024-05-21 14:41:38 +02:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-selinux.c'),
|
2025-09-08 18:31:49 +02:00
|
|
|
'dependencies' : libselinux_cflags,
|
2024-05-21 14:41:38 +02:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-set-disable-mempool.c'),
|
|
|
|
|
'dependencies' : threads,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('test-sizeof.c'),
|
2025-06-21 20:29:51 +09:00
|
|
|
'link_with' : [
|
|
|
|
|
libc_wrapper_static,
|
|
|
|
|
libbasic_static,
|
|
|
|
|
],
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-03-03 13:22:27 +09:00
|
|
|
'sources' : files('test-time-util.c'),
|
|
|
|
|
'timeout' : 120,
|
|
|
|
|
},
|
2023-06-27 15:03:08 -04:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-tpm2.c'),
|
|
|
|
|
'dependencies' : libopenssl,
|
2023-11-13 16:53:56 +01:00
|
|
|
'timeout' : 120,
|
2023-06-27 15:03:08 -04:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-utmp.c'),
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['ENABLE_UTMP'],
|
2023-04-03 08:49:17 +02:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-varlink.c'),
|
|
|
|
|
'dependencies' : threads,
|
|
|
|
|
},
|
2023-09-22 22:44:09 +02:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('test-varlink-idl.c'),
|
|
|
|
|
'dependencies' : threads,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-watchdog.c'),
|
|
|
|
|
'type' : 'unsafe',
|
|
|
|
|
},
|
|
|
|
|
|
2023-06-26 08:52:26 +09:00
|
|
|
# Symbol tests
|
|
|
|
|
test_template + {
|
|
|
|
|
'name' : 'test-libsystemd-sym',
|
|
|
|
|
'sources' : test_libsystemd_sym_c,
|
|
|
|
|
'link_with' : libsystemd,
|
|
|
|
|
'suite' : 'libsystemd',
|
|
|
|
|
},
|
|
|
|
|
test_template + {
|
|
|
|
|
'name' : 'test-libudev-sym',
|
|
|
|
|
'sources' : test_libudev_sym_c,
|
|
|
|
|
'include_directories' : libudev_includes,
|
|
|
|
|
'c_args' : ['-Wno-deprecated-declarations'] + test_cflags,
|
|
|
|
|
'link_with' : libudev,
|
|
|
|
|
'suite' : 'libudev',
|
|
|
|
|
},
|
2023-04-03 08:49:17 +02:00
|
|
|
|
|
|
|
|
# Tests that link to libcore, i.e. tests for pid1 code.
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-bpf-devices.c'),
|
2023-01-25 17:19:52 +01:00
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-bpf-firewall.c'),
|
2023-01-25 17:19:52 +01:00
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-bpf-foreign-programs.c'),
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2024-01-25 13:41:46 +01:00
|
|
|
'sources' : files('test-bpf-restrict-fs.c'),
|
2023-04-03 08:49:17 +02:00
|
|
|
'dependencies' : common_test_dependencies,
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2025-05-15 16:32:46 +02:00
|
|
|
core_test_template + {
|
|
|
|
|
'sources' : files('test-bpf-token.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies + libbpf,
|
|
|
|
|
'conditions' : ['BPF_FRAMEWORK'],
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-cgroup-cpu.c'),
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-cgroup-mask.c'),
|
2023-01-25 17:19:52 +01:00
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-cgroup-unit-default.c'),
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-chown-rec.c'),
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 11:42:41 +02:00
|
|
|
'sources' : files('test-core-unit.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-emergency-action.c'),
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-engine.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-execute.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
'timeout' : 360,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-install.c'),
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-job-type.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-load-fragment.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-loop-block.c'),
|
2025-09-24 10:13:35 +02:00
|
|
|
'dependencies' : [threads],
|
2023-04-03 08:49:17 +02:00
|
|
|
'parallel' : false,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2024-04-24 09:33:25 +02:00
|
|
|
'sources' : files('test-taint.c'),
|
2023-04-03 08:49:17 +02:00
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-namespace.c'),
|
|
|
|
|
'dependencies' : [
|
|
|
|
|
threads,
|
|
|
|
|
],
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-ns.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
'type' : 'manual',
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-path.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
'timeout' : 120,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-sched-prio.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-socket-bind.c'),
|
|
|
|
|
'dependencies' : libdl,
|
2023-06-26 08:52:26 +09:00
|
|
|
'conditions' : ['BPF_FRAMEWORK'],
|
2023-04-03 08:49:17 +02:00
|
|
|
},
|
2023-09-30 19:45:27 +09:00
|
|
|
core_test_template + {
|
|
|
|
|
'sources' : files('test-tables.c'),
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-unit-name.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-unit-serialize.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
core_test_template + {
|
2023-04-03 08:49:17 +02:00
|
|
|
'sources' : files('test-watch-pid.c'),
|
|
|
|
|
'dependencies' : common_test_dependencies,
|
2023-01-25 17:19:52 +01:00
|
|
|
},
|
2017-04-07 00:19:09 -04:00
|
|
|
|
2023-04-03 08:49:17 +02:00
|
|
|
# Tests from other directories that have link_with deps that were not defined earlier
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('../libsystemd/sd-bus/test-bus-error.c'),
|
|
|
|
|
'link_with' : [
|
|
|
|
|
libshared_static,
|
|
|
|
|
libsystemd_static,
|
|
|
|
|
],
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('../libsystemd/sd-device/test-sd-device-thread.c'),
|
2023-12-19 16:03:06 +01:00
|
|
|
'link_with' : [
|
2025-06-21 20:29:51 +09:00
|
|
|
libc_wrapper_static,
|
2024-07-03 16:51:05 +02:00
|
|
|
libbasic_static,
|
2023-12-19 16:03:06 +01:00
|
|
|
libsystemd,
|
|
|
|
|
],
|
2023-01-25 17:19:52 +01:00
|
|
|
'dependencies' : threads,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
2023-01-25 17:19:52 +01:00
|
|
|
'sources' : files('../libudev/test-udev-device-thread.c'),
|
2023-12-19 16:03:06 +01:00
|
|
|
'link_with' : [
|
2025-06-21 20:29:51 +09:00
|
|
|
libc_wrapper_static,
|
2024-07-03 16:51:05 +02:00
|
|
|
libbasic_static,
|
2023-12-19 16:03:06 +01:00
|
|
|
libudev,
|
|
|
|
|
],
|
2023-01-25 17:19:52 +01:00
|
|
|
'dependencies' : threads,
|
|
|
|
|
},
|
2023-06-26 08:52:26 +09:00
|
|
|
test_template + {
|
|
|
|
|
'sources' : files('../libudev/test-libudev.c'),
|
|
|
|
|
'link_with' : [
|
|
|
|
|
libshared,
|
|
|
|
|
libudev_basic,
|
|
|
|
|
],
|
|
|
|
|
},
|
2020-11-16 00:26:44 -08:00
|
|
|
]
|
2025-05-10 22:19:22 +02:00
|
|
|
|
|
|
|
|
if static_libsystemd != 'false'
|
|
|
|
|
executables += [
|
|
|
|
|
test_template + {
|
|
|
|
|
'name' : 'test-libsystemd-static-sym',
|
|
|
|
|
'sources' : test_libsystemd_sym_c,
|
|
|
|
|
'link_with' : install_libsystemd_static,
|
|
|
|
|
'build_by_default' : want_tests != 'false',
|
|
|
|
|
'install' : install_tests,
|
|
|
|
|
'suite' : 'libsystemd',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if static_libudev != 'false'
|
|
|
|
|
executables += [
|
|
|
|
|
test_template + {
|
|
|
|
|
'name' : 'test-libudev-static-sym',
|
|
|
|
|
'sources' : test_libudev_sym_c,
|
|
|
|
|
'include_directories' : libudev_includes,
|
|
|
|
|
'c_args' : ['-Wno-deprecated-declarations'] + test_cflags,
|
|
|
|
|
'link_with' : install_libudev_static,
|
|
|
|
|
'build_by_default' : want_tests != 'false',
|
|
|
|
|
'install' : install_tests,
|
|
|
|
|
'suite' : 'libudev',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
endif
|