From: Thomas Huth <thuth@redhat.com>
To: peter.maydell@linaro.org, qemu-devel@nongnu.org
Cc: Alexander Bulekov <alxndr@bu.edu>
Subject: [PULL 03/10] gitlab-ci.yml: Add oss-fuzz build tests
Date: Tue, 21 Jul 2020 10:10:48 +0200 [thread overview]
Message-ID: <20200721081055.14073-4-thuth@redhat.com> (raw)
In-Reply-To: <20200721081055.14073-1-thuth@redhat.com>
From: Alexander Bulekov <alxndr@bu.edu>
This tries to build and run the fuzzers with the same build-script used
by oss-fuzz. This doesn't guarantee that the builds on oss-fuzz will
also succeed, since oss-fuzz provides its own compiler and fuzzer vars,
but it can catch changes that are not compatible with the the
./scripts/oss-fuzz/build.sh script.
The strange way of finding fuzzer binaries stems from the method used by
oss-fuzz:
https://github.com/google/oss-fuzz/blob/master/infra/base-images/base-runner/targets_list
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200720073223.22945-1-thuth@redhat.com>
[thuth: Tweak the "script" to make it work, exclude slirp test, etc.]
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.gitlab-ci.yml | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 41597c3603..362e5ee755 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -164,22 +164,20 @@ build-clang:
ppc-softmmu s390x-softmmu arm-linux-user
MAKE_CHECK_ARGS: check
-build-fuzzer:
+build-oss-fuzz:
<<: *native_build_job_definition
variables:
IMAGE: fedora
script:
- - mkdir build
- - cd build
- - ../configure --cc=clang --cxx=clang++ --enable-fuzzing
- --enable-sanitizers --target-list=x86_64-softmmu
- - make -j"$JOBS" all check-build x86_64-softmmu/fuzz
- - make check
- - for fuzzer in i440fx-qos-fork-fuzz i440fx-qos-noreset-fuzz
- i440fx-qtest-reboot-fuzz virtio-scsi-flags-fuzz virtio-scsi-fuzz ; do
- echo Testing ${fuzzer} ... ;
- x86_64-softmmu/qemu-fuzz-x86_64 --fuzz-target=${fuzzer} -runs=1000
- || exit 1 ;
+ - mkdir build-oss-fuzz
+ - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
+ ./scripts/oss-fuzz/build.sh
+ - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
+ | grep -v slirp); do
+ grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
+ echo Testing ${fuzzer} ... ;
+ ASAN_OPTIONS="fast_unwind_on_malloc=0"
+ "${fuzzer}" -runs=1000 -seed=1 || exit 1 ;
done
build-tci:
--
2.18.1
next prev parent reply other threads:[~2020-07-21 8:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 8:10 [PULL 00/10] qtest / fuzzer patches Thomas Huth
2020-07-21 8:10 ` [PULL 01/10] scripts/oss-fuzz: Limit target list to i386-softmmu Thomas Huth
2020-07-21 8:10 ` [PULL 02/10] fuzz: Fix leak when assembling datadir path string Thomas Huth
2020-07-21 8:10 ` Thomas Huth [this message]
2020-07-21 8:10 ` [PULL 04/10] fuzz: build without AddressSanitizer, by default Thomas Huth
2020-07-21 8:10 ` [PULL 05/10] docs/fuzz: describe building fuzzers with enable-sanitizers Thomas Huth
2020-07-21 8:10 ` [PULL 06/10] docs/fuzz: add information about useful libFuzzer flags Thomas Huth
2020-07-21 8:10 ` [PULL 07/10] docs/fuzz: add instructions for generating a coverage report Thomas Huth
2020-07-21 8:10 ` [PULL 08/10] MAINTAINERS: Extend the device fuzzing section Thomas Huth
2020-07-21 8:10 ` [PULL 09/10] msf2: Unbreak device-list-properties for "msf-soc" Thomas Huth
2020-07-21 8:10 ` [PULL 10/10] hw: Mark nd_table[] misuse in realize methods FIXME Thomas Huth
2020-07-21 13:03 ` [PULL 00/10] qtest / fuzzer patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200721081055.14073-4-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=alxndr@bu.edu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).