From: Thomas Huth <thuth@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Alexander Bulekov" <alxndr@bu.edu>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH trivial] gitlab-ci/build-oss-fuzz: print FAILED marker in case the test failed and run all tests
Date: Fri, 4 Oct 2024 09:03:04 +0200 [thread overview]
Message-ID: <c6b188c1-bfba-417c-bf6f-5dc943a1e130@redhat.com> (raw)
In-Reply-To: <20241003121656.1173612-1-mjt@tls.msk.ru>
On 03/10/2024 14.16, Michael Tokarev wrote:
> 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>
> ---
> .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 87848c2ffe..25c481e43a 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
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2024-10-04 7:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 12:16 [PATCH trivial] gitlab-ci/build-oss-fuzz: print FAILED marker in case the test failed and run all tests Michael Tokarev
2024-10-04 7:03 ` Thomas Huth [this message]
2024-10-04 14:59 ` Alex Bennée
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=c6b188c1-bfba-417c-bf6f-5dc943a1e130@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=alxndr@bu.edu \
--cc=mjt@tls.msk.ru \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).