1#!/bin/sh23TESTRUNNER="$(pwd)/../cmd2yaml"45testfile="${TMPDIR:-/tmp}/libmpdserver-fuzzing"6trap "rm -f '${testfile}' 2>/dev/null" INT EXIT78while true; do9 find . -name input -a -type f -exec radamsa {} \+ |10 tee "${testfile}" | valgrind --error-exitcode=1 \11 --leak-check=full "${TESTRUNNER}" >/dev/null 2>&11213 ret=$?14 if [ ${ret} -ne 0 -a ${ret} -ne 1 ]; then15 echo "Found input causing crash or leak:" 2>&116 cat "${testfile}" 2>&117 exit 118 fi19done