mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
meson: Use files() for fuzzers
Not having to provide the full path in the source tree is much nicer and the produced lists can also be used anywhere in the source tree.
This commit is contained in:
parent
e1eeebbb11
commit
bbec46c817
@ -3699,7 +3699,8 @@ foreach tuple : fuzzers
|
||||
sources += 'src/fuzz/fuzz-main.c'
|
||||
endif
|
||||
|
||||
name = sources[0].split('/')[-1].split('.')[0]
|
||||
# FIXME: Use fs.stem() with meson >= 0.54.0
|
||||
name = '@0@'.format(sources[0]).split('/')[-1].split('.')[0]
|
||||
|
||||
exe = executable(
|
||||
name,
|
||||
|
@ -359,7 +359,7 @@ if efi_arch[1] in ['ia32', 'x86_64', 'arm', 'aarch64']
|
||||
'HAVE_ZSTD'],
|
||||
]
|
||||
fuzzers += [
|
||||
[['src/boot/efi/fuzz-bcd.c']],
|
||||
[files('fuzz-bcd.c')],
|
||||
]
|
||||
endif
|
||||
|
||||
|
@ -236,7 +236,7 @@ endif
|
||||
############################################################
|
||||
|
||||
fuzzers += [
|
||||
[['src/core/fuzz-unit-file.c'],
|
||||
[files('fuzz-unit-file.c'),
|
||||
[libcore,
|
||||
libshared],
|
||||
[libmount]],
|
||||
|
@ -1,23 +1,23 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
fuzzers += [
|
||||
[['src/fuzz/fuzz-catalog.c']],
|
||||
[files('fuzz-catalog.c')],
|
||||
|
||||
[['src/fuzz/fuzz-json.c']],
|
||||
[files('fuzz-json.c')],
|
||||
|
||||
[['src/fuzz/fuzz-varlink.c']],
|
||||
[files('fuzz-varlink.c')],
|
||||
|
||||
[['src/fuzz/fuzz-udev-database.c']],
|
||||
[files('fuzz-udev-database.c')],
|
||||
|
||||
[['src/fuzz/fuzz-compress.c']],
|
||||
[files('fuzz-compress.c')],
|
||||
|
||||
[['src/fuzz/fuzz-bus-label.c']],
|
||||
[files('fuzz-bus-label.c')],
|
||||
|
||||
[['src/fuzz/fuzz-env-file.c']],
|
||||
[files('fuzz-env-file.c')],
|
||||
|
||||
[['src/fuzz/fuzz-hostname-setup.c']],
|
||||
[files('fuzz-hostname-setup.c')],
|
||||
|
||||
[['src/fuzz/fuzz-calendarspec.c']],
|
||||
[files('fuzz-calendarspec.c')],
|
||||
|
||||
[['src/fuzz/fuzz-time-util.c']],
|
||||
[files('fuzz-time-util.c')],
|
||||
]
|
||||
|
@ -76,7 +76,7 @@ endif
|
||||
############################################################
|
||||
|
||||
fuzzers += [
|
||||
[['src/journal-remote/fuzz-journal-remote.c'],
|
||||
[files('fuzz-journal-remote.c'),
|
||||
[libsystemd_journal_remote,
|
||||
libshared],
|
||||
[],
|
||||
|
@ -118,38 +118,38 @@ tests += [
|
||||
]
|
||||
|
||||
fuzzers += [
|
||||
[['src/journal/fuzz-journald-audit.c',
|
||||
'src/journal/fuzz-journald.c'],
|
||||
[files('fuzz-journald-audit.c',
|
||||
'fuzz-journald.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[libselinux]],
|
||||
|
||||
[['src/journal/fuzz-journald-kmsg.c',
|
||||
'src/journal/fuzz-journald.c'],
|
||||
[files('fuzz-journald-kmsg.c',
|
||||
'fuzz-journald.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[libselinux]],
|
||||
|
||||
[['src/journal/fuzz-journald-native.c',
|
||||
'src/journal/fuzz-journald.c'],
|
||||
[files('fuzz-journald-native.c',
|
||||
'fuzz-journald.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[libselinux]],
|
||||
|
||||
[['src/journal/fuzz-journald-native-fd.c',
|
||||
'src/journal/fuzz-journald.c'],
|
||||
[files('fuzz-journald-native-fd.c',
|
||||
'fuzz-journald.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[libselinux]],
|
||||
|
||||
[['src/journal/fuzz-journald-stream.c',
|
||||
'src/journal/fuzz-journald.c'],
|
||||
[files('fuzz-journald-stream.c',
|
||||
'fuzz-journald.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[libselinux]],
|
||||
|
||||
[['src/journal/fuzz-journald-syslog.c',
|
||||
'src/journal/fuzz-journald.c'],
|
||||
[files('fuzz-journald-syslog.c',
|
||||
'fuzz-journald.c'),
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[libselinux]],
|
||||
|
@ -105,19 +105,19 @@ tests += [
|
||||
]
|
||||
|
||||
fuzzers += [
|
||||
[['src/libsystemd-network/fuzz-dhcp6-client.c'],
|
||||
[files('fuzz-dhcp6-client.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/fuzz-dhcp-server.c'],
|
||||
[files('fuzz-dhcp-server.c'),
|
||||
[libsystemd_network,
|
||||
libshared]],
|
||||
|
||||
[['src/libsystemd-network/fuzz-lldp-rx.c'],
|
||||
[files('fuzz-lldp-rx.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
|
||||
[['src/libsystemd-network/fuzz-ndisc-rs.c'],
|
||||
[files('fuzz-ndisc-rs.c'),
|
||||
[libshared,
|
||||
libsystemd_network]],
|
||||
]
|
||||
|
@ -316,7 +316,7 @@ endif
|
||||
############################################################
|
||||
|
||||
fuzzers += [
|
||||
[['src/libsystemd/sd-bus/fuzz-bus-message.c']],
|
||||
[files('sd-bus/fuzz-bus-message.c')],
|
||||
|
||||
[['src/libsystemd/sd-bus/fuzz-bus-match.c']],
|
||||
[files('sd-bus/fuzz-bus-match.c')],
|
||||
]
|
||||
|
@ -263,14 +263,14 @@ if conf.get('ENABLE_NETWORKD') == 1
|
||||
endif
|
||||
|
||||
fuzzers += [
|
||||
[['src/network/fuzz-netdev-parser.c'],
|
||||
[files('fuzz-netdev-parser.c'),
|
||||
[libnetworkd_core,
|
||||
libsystemd_network,
|
||||
networkd_link_with],
|
||||
[threads],
|
||||
network_includes],
|
||||
|
||||
[['src/network/fuzz-network-parser.c'],
|
||||
[files('fuzz-network-parser.c'),
|
||||
[libnetworkd_core,
|
||||
libsystemd_network,
|
||||
networkd_link_with],
|
||||
|
@ -66,12 +66,12 @@ tests += [
|
||||
]
|
||||
|
||||
fuzzers += [
|
||||
[['src/nspawn/fuzz-nspawn-settings.c'],
|
||||
[files('fuzz-nspawn-settings.c'),
|
||||
[libshared,
|
||||
libnspawn_core],
|
||||
[libseccomp]],
|
||||
|
||||
[['src/nspawn/fuzz-nspawn-oci.c'],
|
||||
[files('fuzz-nspawn-oci.c'),
|
||||
[libshared,
|
||||
libnspawn_core],
|
||||
[libseccomp]],
|
||||
|
@ -216,7 +216,7 @@ tests += [
|
||||
]
|
||||
|
||||
fuzzers += [
|
||||
[['src/resolve/fuzz-dns-packet.c'],
|
||||
[files('fuzz-dns-packet.c'),
|
||||
[libsystemd_resolve_core,
|
||||
libshared],
|
||||
[lib_openssl_or_gcrypt,
|
||||
|
@ -83,7 +83,8 @@ else
|
||||
endif
|
||||
|
||||
fuzzers += [
|
||||
[['src/systemctl/fuzz-systemctl-parse-argv.c',
|
||||
systemctl_sources],
|
||||
[files('fuzz-systemctl-parse-argv.c') +
|
||||
systemctl_sources,
|
||||
systemctl_link_with,
|
||||
[], [], ['-DFUZZ_SYSTEMCTL_PARSE_ARGV']]]
|
||||
[], [], ['-DFUZZ_SYSTEMCTL_PARSE_ARGV']]
|
||||
]
|
||||
|
@ -174,24 +174,23 @@ if install_sysconfdir
|
||||
endif
|
||||
|
||||
fuzzers += [
|
||||
[['src/udev/net/fuzz-link-parser.c',
|
||||
'src/fuzz/fuzz.h'],
|
||||
[files('net/fuzz-link-parser.c'),
|
||||
[libudevd_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libacl],
|
||||
udev_includes],
|
||||
|
||||
[['src/udev/fuzz-udev-rules.c'],
|
||||
[files('fuzz-udev-rules.c'),
|
||||
[libudevd_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libacl]],
|
||||
|
||||
[['src/udev/fuzz-udev-rule-parse-value.c']],
|
||||
[files('fuzz-udev-rule-parse-value.c')],
|
||||
|
||||
[['src/udev/fido_id/fuzz-fido-id-desc.c',
|
||||
'src/udev/fido_id/fido_id_desc.c']],
|
||||
[files('fido_id/fuzz-fido-id-desc.c',
|
||||
'fido_id/fido_id_desc.c')],
|
||||
]
|
||||
|
||||
tests += [
|
||||
|
@ -12,7 +12,7 @@ tests += [
|
||||
]
|
||||
|
||||
fuzzers += [
|
||||
[['src/xdg-autostart-generator/fuzz-xdg-desktop.c',
|
||||
'src/xdg-autostart-generator/xdg-autostart-service.c',
|
||||
'src/xdg-autostart-generator/xdg-autostart-service.h']],
|
||||
[files('fuzz-xdg-desktop.c',
|
||||
'xdg-autostart-service.c',
|
||||
'xdg-autostart-service.h')],
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user