From: Anthony PERARD <anthony@xenproject.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Subject: Re: [PATCH 3/3] CI: Drop custom handling of tools/tests
Date: Mon, 26 May 2025 19:22:49 +0200 [thread overview]
Message-ID: <aDSjaewFMxUj6Tel@l14> (raw)
In-Reply-To: <1e690ecb-5060-4dfe-a515-acbbf214bc99@citrix.com>
On Mon, May 26, 2025 at 05:45:29PM +0100, Andrew Cooper wrote:
> On 20/05/2025 9:52 pm, Andrew Cooper wrote:
> > diff --git a/automation/scripts/run-tools-tests b/automation/scripts/run-tools-tests
> > index 770e97c3e943..8d7aa8fa5140 100755
> > --- a/automation/scripts/run-tools-tests
> > +++ b/automation/scripts/run-tools-tests
> > @@ -12,30 +12,25 @@ printf '<?xml version="1.0" encoding="UTF-8"?>\n' > "$xml_out"
> > printf '<testsuites name="tools.tests">\n' >> "$xml_out"
> > printf ' <testsuite name="tools.tests">\n' >> "$xml_out"
> > failed=
> > -for dir in "$1"/*; do
> > - [ -d "$dir" ] || continue
> > - echo "Running test in $dir"
> > - printf ' <testcase name="%s">\n' "$dir" >> "$xml_out"
> > - ret=
> > - for f in "$dir"/*; do
> > - [ -f "$f" ] || continue
> > - [ -x "$f" ] || continue
> > - "$f" 2>&1 | tee /tmp/out
> > - ret=$?
> > - if [ "$ret" -ne 0 ]; then
> > - echo "FAILED: $ret"
> > - failed+=" $dir"
> > - printf ' <failure type="failure" message="binary %s exited with code %d">\n' "$f" "$ret" >> "$xml_out"
> > - # TODO: could use xml escaping... but current tests seems to
> > - # produce sane output
> > - cat /tmp/out >> "$xml_out"
> > - printf ' </failure>\n' >> "$xml_out"
> > - else
> > - echo "PASSED"
> > - fi
> > - done
> > - if [ -z "$ret" ]; then
> > - printf ' <skipped type="skipped" message="no executable test found in %s"/>\n' "$dir" >> "$xml_out"
> > +for f in "$1"/*; do
> > + if [ -x "$f" ]; then
> > + echo "SKIP: $f not executable"
> > + continue
>
> This should be ! -x
>
> I had that hunk in the wrong patch when posting this series.
With that fixed:
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
But I think there's an issue with the script...
> > + "$f" 2>&1 | tee /tmp/out
> > + ret=$?
> > + if [ "$ret" -ne 0 ]; then
Is this checking the correct exit value? It seems that without `set -o
pipefail`, we only have the exit value of `tee` which should never fail.
But I think we should grab the value of ${PIPESTATUS[0]} to actually
read the exit value of $f.
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2025-05-26 17:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 20:52 [PATCH 0/3] CI: Improvements to *-tools-test-* jobs Andrew Cooper
2025-05-20 20:52 ` [PATCH 1/3] tools/tests: Drop depriv-fd-checker Andrew Cooper
2025-05-26 16:42 ` Anthony PERARD
2025-05-28 0:07 ` Stefano Stabellini
2025-05-20 20:52 ` [PATCH 2/3] tools/tests: Install tests into $(LIBEXEC)/tests Andrew Cooper
2025-05-26 16:56 ` Anthony PERARD
2025-05-28 0:07 ` Stefano Stabellini
2025-05-20 20:52 ` [PATCH 3/3] CI: Drop custom handling of tools/tests Andrew Cooper
2025-05-26 16:45 ` Andrew Cooper
2025-05-26 17:22 ` Anthony PERARD [this message]
2025-05-26 17:31 ` Andrew Cooper
2025-05-28 0:16 ` Stefano Stabellini
2025-05-28 0:18 ` Andrew Cooper
2025-05-21 0:10 ` [PATCH 0/3] CI: Improvements to *-tools-test-* jobs dmkhn
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=aDSjaewFMxUj6Tel@l14 \
--to=anthony@xenproject.org \
--cc=andrew.cooper3@citrix.com \
--cc=marmarek@invisiblethingslab.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.