spapr: Clean up local variable shadowing in spapr_dt_cpus()
[qemu/kevin.git] / tests / docker / test-fuzz
blob7e506ae1f6e14932a9f11515f0138b664ded23ca
1 #!/bin/bash -e
3 # Compile and check with oss-fuzz.
5 # Copyright (c) 2023 Linaro Ltd.
7 # Authors:
8 # Alex Bennée <alex.bennee@linaro.org>
10 # SPDX-License-Identifier: GPL-2.0-or-later
12 . common.rc
14 requires_binary clang
16 # the build script runs out of $src so we need to copy across
17 cd "$BUILD_DIR"
18 cp -a $QEMU_SRC .
19 cd src
20 mkdir build-oss-fuzz
21 export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
22 env CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" ./scripts/oss-fuzz/build.sh
23 export ASAN_OPTIONS="fast_unwind_on_malloc=0"
24 for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f | grep -v slirp); do
25 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
26 echo Testing ${fuzzer} ... ;
27 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
28 done