From: no-reply@sashiko.virtuozzo.com
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>, khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 5/6] selftests/futex: fail run.sh when a test fails
Date: Mon, 26 Oct 2026 12:47:01 +0000 [thread overview]
Message-ID: <010701a1783ffa09-971e0296-9335-48b7-b612-775d9945cb5f-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261026124139.606106-6-eva.kurchatova@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] selftests/futex: futex_wait_wouldblock reports PASS on futex_waitv failure
--
commit af44cf5afc0f94fd2ab55dd4e0f6be72e650b92f
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
selftests/futex: fail run.sh when a test fails
This patch changes run.sh in the futex functional selftests so that it
records a failure from any test binary and exits 1 at the end. Before this,
run.sh exited with the status of the last test only.
Link: https://virtuozzo.atlassian.net/browse/VSTOR-134205
> diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh
> --- a/tools/testing/selftests/futex/functional/run.sh
> +++ b/tools/testing/selftests/futex/functional/run.sh
[ ... ]
> echo
> -./futex_wait_wouldblock $COLOR
> +./futex_wait_wouldblock $COLOR || ret=1
[Severity: Medium]
This isn't a bug in run.sh itself, but it exposes a reporting problem in
futex_wait_wouldblock.c that this patch does not address.
In main() of futex_wait_wouldblock.c, the futex_waitv failure branch
reports a pass and then sets a failing return value:
res = futex_waitv(&waitv, 1, 0, &to, CLOCK_MONOTONIC);
if (!res || errno != EWOULDBLOCK) {
ksft_test_result_pass("futex_waitv returned: %d %s\n",
res ? errno : res,
res ? strerror(errno) : "");
ret = RET_FAIL;
}
If futex_waitv() returns 0, or fails with an errno other than EWOULDBLOCK,
the test prints an "ok" line and then exits non-zero.
Before this patch, run.sh ignored that exit status. With the new
"|| ret=1", run.sh now exits 1 on this path, but the output contains no
failing line to explain why.
The preceding futex_wait branch in the same function uses
ksft_test_result_fail() for the equivalent condition.
Should the futex_waitv failure branch call ksft_test_result_fail() instead
of ksft_test_result_pass()?
I compared this commit with the end of the series (d7a86a7b) and found no
change to futex_wait_wouldblock.c. The patch that touches futex_waitv.c does
not cover it either.
> echo
> -./futex_wait_uninitialized_heap $COLOR
> -./futex_wait_private_mapped_file $COLOR
> +./futex_wait_uninitialized_heap $COLOR || ret=1
> +./futex_wait_private_mapped_file $COLOR || ret=1
[ ... ]
> +./futex_numa_mpol $COLOR || ret=1
> +
> +exit $ret
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261026124139.606106-1-eva.kurchatova@virtuozzo.com?part=5
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-26 12:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 12:40 [Devel] [PATCH hci-8.1 0/6] selftests: fix sticky failure in runners Eva Kurchatova
2026-10-26 12:40 ` [Devel] [PATCH hci-8.1 1/6] ms/selftests/bpf: Upon failures, exit with code 1 in test_xsk.sh Eva Kurchatova
2026-10-26 12:44 ` no-reply
2026-10-26 12:40 ` [Devel] [PATCH hci-8.1 2/6] selftests/memfd: fail run_hugetlbfs_test.sh when a test fails Eva Kurchatova
2026-10-26 12:44 ` no-reply
2026-10-26 12:40 ` [Devel] [PATCH hci-8.1 3/6] selftests: sigaltstack: report the failures the signal handler records Eva Kurchatova
2026-10-26 12:45 ` no-reply
2026-10-26 12:40 ` [Devel] [PATCH hci-8.1 4/6] selftests/zram: fail when a step fails Eva Kurchatova
2026-10-26 12:46 ` no-reply
2026-10-26 12:40 ` [Devel] [PATCH hci-8.1 5/6] selftests/futex: fail run.sh when a test fails Eva Kurchatova
2026-10-26 12:47 ` no-reply [this message]
2026-10-26 12:40 ` [Devel] [PATCH hci-8.1 6/6] selftests/futex: fail futex_waitv when the waiter failed Eva Kurchatova
2026-10-26 12:47 ` no-reply
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=010701a1783ffa09-971e0296-9335-48b7-b612-775d9945cb5f-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=khorenko@virtuozzo.com \
/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