Files
finit/test/fuzz-msg-parse.sh
Joachim Wiberg 969f9a112c test: locate the fuzz sweep in the build tree
fuzz-msg-parse.sh looked for its driver next to the script, which only
holds when srcdir and builddir are the same.  Every VPATH build skipped
the sweep, claiming D-Bus was off:

    SKIP: fuzz-msg-parse.sh

distcheck, and with it the release job, is a VPATH build.  Use
top_builddir, which the test environment already exports.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-08-29 13:54:13 +02:00

21 lines
581 B
Bash
Executable File

#!/bin/sh
# libink: __msg_parse() against truncation, corruption, and garbage.
#
# Runs the fuzz target's fixed sweep, which is the same contract check
# libFuzzer drives, so the suite covers it on every build without
# needing clang. Anything it finds aborts, and the sanitizers CI
# builds with turn a stray read into a failure here rather than a
# puzzle on a target.
set -eu
TEST_DIR=$(dirname "$0")
DRIVER="${top_builddir:-$TEST_DIR/..}/test/src/fuzz-msg-parse"
[ -x "$DRIVER" ] || {
echo "fuzz-msg-parse not built, D-Bus support is off"
exit 77
}
exec "$DRIVER"