]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: Generate fuzzer inputs with directives 24958/head
authorMichal Koutný <mkoutny@suse.com>
Thu, 6 Oct 2022 14:48:01 +0000 (16:48 +0200)
committerMichal Koutný <mkoutny@suse.com>
Thu, 20 Oct 2022 12:43:50 +0000 (14:43 +0200)
commit7e343b530e68c55f868a4a8261824ca543319a52
tree574f69cfdb251b477360e8a57a259ded6918feaa
parent7db5761ddaa53eba197b5abc485e3290f47c661f
meson: Generate fuzzer inputs with directives

The lists of directives for fuzzer tests are maintained manually in the
repo. There is a tools/check-directives.sh script that runs during test
phase and reports stale directive lists.
Let's rework the script into a generator so that these directive files
are created on-the-flight and needn't be updated whenever a unit file
directives change. The scripts is rewritten in Python to get rid of gawk
dependency and each generated file is a separate meson target so that
incremental builds refresh what is just necessary (and parallelize
(negligible)).

Note: test/fuzz/fuzz-unit-file/directives-all.slice is kept since there
is not automated way to generate it (it is not covered by the check
script neither).
16 files changed:
meson.build
test/fuzz/fuzz-link-parser/directives.link [deleted file]
test/fuzz/fuzz-netdev-parser/directives.netdev [deleted file]
test/fuzz/fuzz-network-parser/directives [deleted file]
test/fuzz/fuzz-unit-file/directives.automount [deleted file]
test/fuzz/fuzz-unit-file/directives.mount [deleted file]
test/fuzz/fuzz-unit-file/directives.path [deleted file]
test/fuzz/fuzz-unit-file/directives.scope [deleted file]
test/fuzz/fuzz-unit-file/directives.service [deleted file]
test/fuzz/fuzz-unit-file/directives.slice [deleted file]
test/fuzz/fuzz-unit-file/directives.socket [deleted file]
test/fuzz/fuzz-unit-file/directives.swap [deleted file]
test/fuzz/fuzz-unit-file/directives.timer [deleted file]
test/fuzz/generate-directives.py [new file with mode: 0644]
test/fuzz/meson.build
tools/check-directives.sh [deleted file]