mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: usama.anjum@collabora.com, Shuah Khan <skhan@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 6/7] selftests: vDSO: vdso_test_getrandom: Always print TAP header
Date: Fri, 2 May 2025 18:48:03 +0500	[thread overview]
Message-ID: <36bb6e78-1db9-4dad-a2ef-7e860ead30e4@collabora.com> (raw)
In-Reply-To: <20250502-selftests-vdso-fixes-v1-6-fb5d640a4f78@linutronix.de>

On 5/2/25 5:40 PM, Thomas Weißschuh wrote:
> The TAP specification requires that the output begins with a header line.
> If vgetrandom_init() fails and skips the test, that header line is missing.
> 
> Call vgetrandom_init() after ksft_print_header().
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

> ---
>  tools/testing/selftests/vDSO/vdso_test_getrandom.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> index b0e0d664508a38d6dde9df0a61ec8198ee928a17..01892d8e65d754d0353f7df2b63910d5be8cd1bc 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> @@ -232,6 +232,7 @@ static void kselftest(void)
>  	pid_t child;
>  
>  	ksft_print_header();
> +	vgetrandom_init();
>  	ksft_set_plan(2);
>  
>  	for (size_t i = 0; i < 1000; ++i) {
> @@ -285,8 +286,6 @@ static void usage(const char *argv0)
>  
>  int main(int argc, char *argv[])
>  {
> -	vgetrandom_init();
> -
>  	if (argc == 1) {
>  		kselftest();
>  		return 0;
> @@ -296,6 +295,9 @@ int main(int argc, char *argv[])
>  		usage(argv[0]);
>  		return 1;
>  	}
> +
> +	vgetrandom_init();
> +
>  	if (!strcmp(argv[1], "bench-single"))
>  		bench_single();
>  	else if (!strcmp(argv[1], "bench-multi"))
> 


-- 
Regards,
Usama

  reply	other threads:[~2025-05-02 13:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02 12:40 [PATCH 0/7] selftests: vDSO: Some cleanups and fixes Thomas Weißschuh
2025-05-02 12:40 ` [PATCH 1/7] selftests: vDSO: chacha: Correctly skip test if necessary Thomas Weißschuh
2025-05-02 13:42   ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 2/7] selftests: vDSO: clock_getres: Drop unused include of err.h Thomas Weißschuh
2025-05-02 13:43   ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 3/7] selftests: vDSO: vdso_test_correctness: Fix -Wold-style-definitions Thomas Weißschuh
2025-05-02 13:44   ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 4/7] selftests: vDSO: vdso_test_getrandom: Drop unused include of linux/compiler.h Thomas Weißschuh
2025-05-02 12:40 ` [PATCH 5/7] selftests: vDSO: vdso_test_getrandom: Drop some dead code Thomas Weißschuh
2025-05-02 13:46   ` Muhammad Usama Anjum
2025-05-02 12:40 ` [PATCH 6/7] selftests: vDSO: vdso_test_getrandom: Always print TAP header Thomas Weißschuh
2025-05-02 13:48   ` Muhammad Usama Anjum [this message]
2025-05-02 12:40 ` [PATCH 7/7] selftests: vDSO: vdso_config: Avoid -Wunused-variables Thomas Weißschuh
2025-05-02 13:49   ` Muhammad Usama Anjum

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=36bb6e78-1db9-4dad-a2ef-7e860ead30e4@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=vincenzo.frascino@arm.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

all inboxes | Powered by JetHome®