qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Michael Tokarev <mjt@tls.msk.ru>
Subject: [PULL 05/12] gitlab-ci/build-oss-fuzz: print FAILED marker in case the test failed and run all tests
Date: Mon,  7 Oct 2024 13:50:20 +0200	[thread overview]
Message-ID: <20241007115027.243425-6-thuth@redhat.com> (raw)
In-Reply-To: <20241007115027.243425-1-thuth@redhat.com>

From: Michael Tokarev <mjt@tls.msk.ru>

currently, if an oss-fuzz fails, the script does just `exit 1`
without any additional output, and looking at the build log in
the gitlab ci it is not clear what actually failed, without
looking at build-oss-fuzz script and seeing this `exit 1`.

Print easily recognizable error message about test failure, so
it becomes obvious what exactly has failed.

While at it, continue running other tests even in case of
failure, and exit non-zero if at least one test failed.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20241003121656.1173612-1-mjt@tls.msk.ru>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitlab-ci.d/buildtest.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 669c980c4b..34d3f4e9ab 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -628,12 +628,15 @@ build-oss-fuzz:
     - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
       ./scripts/oss-fuzz/build.sh
     - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
+    - failures=0
     - 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} ... ;
-        "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
+        "${fuzzer}" -runs=1 -seed=1 || { echo "FAILED:"" ${fuzzer} exit code is $?"; failures=$(($failures+1)); };
       done
+    - echo "Number of failures:"" $failures"
+    - test $failures = 0
 
 build-tci:
   extends: .native_build_job_template
-- 
2.46.1



  parent reply	other threads:[~2024-10-07 11:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07 11:50 [PULL 00/12] CI fixes and various clean-ups Thomas Huth
2024-10-07 11:50 ` [PULL 01/12] docs: Mark "gluster" support in QEMU as deprecated Thomas Huth
2024-10-07 11:50 ` [PULL 02/12] .gitlab-ci.d/cirrus: Drop support for macOS 13 (Ventura) Thomas Huth
2024-10-07 11:50 ` [PULL 03/12] .gitlab-ci.d/cirrus: Add manual testing of macOS 15 (Sequoia) Thomas Huth
2024-10-07 11:50 ` [PULL 04/12] disas: Remove CRIS disassembler Thomas Huth
2024-10-07 11:50 ` Thomas Huth [this message]
2024-10-07 11:50 ` [PULL 06/12] hw/m68k: Use explicit big-endian LD/ST API Thomas Huth
2024-10-07 11:50 ` [PULL 07/12] target/m68k: " Thomas Huth
2024-10-07 11:50 ` [PULL 08/12] hw/s390x: " Thomas Huth
2024-10-07 11:50 ` [PULL 09/12] target/s390x: Replace ldtul_p() -> ldq_p() Thomas Huth
2024-10-07 11:50 ` [PULL 10/12] target/s390x: Use explicit big-endian LD/ST API Thomas Huth
2024-10-07 11:50 ` [PULL 11/12] tests/functional: Switch back to the gitlab URLs for the advent calendar tests Thomas Huth
2024-10-07 11:50 ` [PULL 12/12] tests/functional: Bump timeout of some tests Thomas Huth
2024-10-07 13:43 ` [PULL 00/12] CI fixes and various clean-ups Peter Maydell
2024-10-07 14:13   ` Peter Maydell
2024-10-07 16:41     ` Thomas Huth
2024-10-07 16:51       ` 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=20241007115027.243425-6-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=mjt@tls.msk.ru \
    --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).