summaryrefslogtreecommitdiffstats
path: root/test/TEST-21-DFUZZER
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2021-12-13 20:50:28 +0100
committerFrantisek Sumsal <frantisek@sumsal.cz>2022-06-19 16:22:35 +0200
commit354b3364aa63620a0f732bb8a6fe9332a4f550e4 (patch)
tree9eed5e1f07f44ead44b00f4d13951f9104608f1d /test/TEST-21-DFUZZER
parenttest: make masking of supplementary services configurable (diff)
downloadsystemd-354b3364aa63620a0f732bb8a6fe9332a4f550e4.tar.xz
systemd-354b3364aa63620a0f732bb8a6fe9332a4f550e4.zip
test: fuzz our dbus interfaces with dfuzzer
Diffstat (limited to 'test/TEST-21-DFUZZER')
l---------test/TEST-21-DFUZZER/Makefile1
-rwxr-xr-xtest/TEST-21-DFUZZER/test.sh24
2 files changed, 25 insertions, 0 deletions
diff --git a/test/TEST-21-DFUZZER/Makefile b/test/TEST-21-DFUZZER/Makefile
new file mode 120000
index 0000000000..e9f93b1104
--- /dev/null
+++ b/test/TEST-21-DFUZZER/Makefile
@@ -0,0 +1 @@
+../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-21-DFUZZER/test.sh b/test/TEST-21-DFUZZER/test.sh
new file mode 100755
index 0000000000..ecc04e368c
--- /dev/null
+++ b/test/TEST-21-DFUZZER/test.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -e
+
+TEST_DESCRIPTION="Fuzz our D-Bus interfaces with dfuzzer"
+TEST_NO_NSPAWN=1
+TEST_SUPPORTING_SERVICES_SHOULD_BE_MASKED=0
+QEMU_TIMEOUT="${QEMU_TIMEOUT:-1800}"
+
+# shellcheck source=test/test-functions
+. "${TEST_BASE_DIR:?}/test-functions"
+
+command -v dfuzzer >/dev/null || exit 0
+
+test_append_files() {
+ local workspace="${1:?}"
+
+ image_install dfuzzer /etc/dfuzzer.conf
+
+ # Enable all systemd-related services, including the D-Bus ones
+ "$SYSTEMCTL" --root="${workspace:?}" preset-all
+}
+
+do_test "$@"