From: Andrea Righi <arighi@nvidia.com>
To: zhidao su <soolaugust@gmail.com>
Cc: sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org,
tj@kernel.org, void@manifault.com, changwoo@igalia.com,
peterz@infradead.org, mingo@redhat.com,
zhidao su <suzhidao@xiaomi.com>
Subject: Re: [PATCH 2/2] selftests/sched_ext: Return non-zero exit code on test failure
Date: Thu, 19 Mar 2026 07:49:49 +0100 [thread overview]
Message-ID: <abucjYB136uIIrmb@gpd4> (raw)
In-Reply-To: <20260319053026.447892-2-suzhidao@xiaomi.com>
On Thu, Mar 19, 2026 at 01:30:26PM +0800, zhidao su wrote:
> runner.c always returned 0 regardless of test results. The kselftest
> framework (tools/testing/selftests/kselftest/runner.sh) invokes the runner
> binary and treats a non-zero exit code as a test failure; with the old
> code, failed sched_ext tests were silently hidden from the parent harness
> even though individual "not ok" TAP lines were emitted.
>
> Return 1 when at least one test failed, 0 when all tests passed or were
> skipped.
>
> Signed-off-by: zhidao su <suzhidao@xiaomi.com>
Makes sense.
Acked-by: Andrea Righi <arighi@nvidia.com>
Thanks,
-Andrea
> ---
> tools/testing/selftests/sched_ext/runner.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/sched_ext/runner.c b/tools/testing/selftests/sched_ext/runner.c
> index 37ad56c3eb29..4c68efa1512a 100644
> --- a/tools/testing/selftests/sched_ext/runner.c
> +++ b/tools/testing/selftests/sched_ext/runner.c
> @@ -217,7 +217,7 @@ int main(int argc, char **argv)
> printf(" - %s\n", failed_tests[i]);
> }
>
> - return 0;
> + return failed > 0 ? 1 : 0;
> }
>
> void scx_test_register(struct scx_test *test)
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-03-19 6:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 5:30 [PATCH 1/2] sched_ext: Documentation: Document events sysfs file and module parameters zhidao su
2026-03-19 5:30 ` [PATCH 2/2] selftests/sched_ext: Return non-zero exit code on test failure zhidao su
2026-03-19 6:49 ` Andrea Righi [this message]
2026-03-19 6:45 ` [PATCH 1/2] sched_ext: Documentation: Document events sysfs file and module parameters Andrea Righi
2026-03-21 18:42 ` Tejun Heo
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=abucjYB136uIIrmb@gpd4 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sched-ext@lists.linux.dev \
--cc=soolaugust@gmail.com \
--cc=suzhidao@xiaomi.com \
--cc=tj@kernel.org \
--cc=void@manifault.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