From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: [PULL 05/11] fuzz: avoid building twice, when running on gitlab
Date: Sat, 14 Aug 2021 08:09:50 +0200 [thread overview]
Message-ID: <20210814060956.12852-6-thuth@redhat.com> (raw)
In-Reply-To: <20210814060956.12852-1-thuth@redhat.com>
From: Alexander Bulekov <alxndr@bu.edu>
On oss-fuzz, we build twice, to put together a build that is portable to
the runner containers. On gitlab ci, this is wasteful and contributes to
timeouts on the build-oss-fuzz job. Avoid building twice on gitlab, at
the remote cost of potentially missing some cases that break oss-fuzz
builds.
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20210809111621.54454-1-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
scripts/oss-fuzz/build.sh | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh
index c1af43fded..98b56e0521 100755
--- a/scripts/oss-fuzz/build.sh
+++ b/scripts/oss-fuzz/build.sh
@@ -73,17 +73,19 @@ if ! make "-j$(nproc)" qemu-fuzz-i386; then
"\nFor example: CC=clang CXX=clang++ $0"
fi
-for i in $(ldd ./qemu-fuzz-i386 | cut -f3 -d' '); do
- cp "$i" "$DEST_DIR/lib/"
-done
-rm qemu-fuzz-i386
-
-# Build a second time to build the final binary with correct rpath
-../configure --disable-werror --cc="$CC" --cxx="$CXX" --enable-fuzzing \
- --prefix="$DEST_DIR" --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" \
- --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="-Wl,-rpath,\$ORIGIN/lib" \
- --target-list="i386-softmmu"
-make "-j$(nproc)" qemu-fuzz-i386 V=1
+if [ "$GITLAB_CI" != "true" ]; then
+ for i in $(ldd ./qemu-fuzz-i386 | cut -f3 -d' '); do
+ cp "$i" "$DEST_DIR/lib/"
+ done
+ rm qemu-fuzz-i386
+
+ # Build a second time to build the final binary with correct rpath
+ ../configure --disable-werror --cc="$CC" --cxx="$CXX" --enable-fuzzing \
+ --prefix="$DEST_DIR" --bindir="$DEST_DIR" --datadir="$DEST_DIR/data/" \
+ --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="-Wl,-rpath,\$ORIGIN/lib" \
+ --target-list="i386-softmmu"
+ make "-j$(nproc)" qemu-fuzz-i386 V=1
+fi
# Copy over the datadir
cp -r ../pc-bios/ "$DEST_DIR/pc-bios"
--
2.27.0
next prev parent reply other threads:[~2021-08-14 6:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 6:09 [PULL 00/11] Optional gitlab-CI and doc fixes for -rc4 Thomas Huth
2021-08-14 6:09 ` [PULL 01/11] gitlab: exclude sparc-softmmu and riscv32-softmmu from cross builds Thomas Huth
2021-08-14 6:09 ` [PULL 02/11] gitlab: skip many more targets in windows " Thomas Huth
2021-08-15 15:47 ` Peter Maydell
2021-08-14 6:09 ` [PULL 03/11] storage-daemon: Add missing build dependency to the vhost-user-blk-test Thomas Huth
2021-08-14 6:09 ` [PULL 04/11] tests/qtest/vhost-user-blk-test: Check whether qemu-storage-daemon is available Thomas Huth
2021-08-14 6:09 ` Thomas Huth [this message]
2021-08-14 6:09 ` [PULL 06/11] docs/about/removed-features: Document removed CLI options from QEMU v2.12 Thomas Huth
2021-08-14 6:09 ` [PULL 07/11] docs/about/removed-features: Document removed CLI options from QEMU v3.0 Thomas Huth
2021-08-14 6:09 ` [PULL 08/11] docs/about/removed-features: Document removed CLI options from QEMU v3.1 Thomas Huth
2021-08-14 6:09 ` [PULL 09/11] docs/about/removed-features: Document removed HMP commands from QEMU v2.12 Thomas Huth
2021-08-14 6:09 ` [PULL 10/11] docs/about/removed-features: Document removed devices from older QEMU versions Thomas Huth
2021-08-14 6:09 ` [PULL 11/11] docs/about/removed-features: Document removed machines " Thomas Huth
2021-08-16 9:01 ` [PULL 00/11] Optional gitlab-CI and doc fixes for -rc4 Peter Maydell
2021-08-16 10:22 ` Alexander Bulekov
2021-08-16 11:11 ` Daniel P. Berrangé
2021-08-16 11:30 ` Alexander Bulekov
2021-08-16 11:40 ` Philippe Mathieu-Daudé
2021-08-16 12:00 ` Alexander Bulekov
2021-08-16 11:44 ` Daniel P. Berrangé
2021-08-17 7:23 ` Thomas Huth
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=20210814060956.12852-6-thuth@redhat.com \
--to=thuth@redhat.com \
--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).