linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi
@ 2024-02-13 19:06 Mark Brown
  2024-02-14 21:08 ` Davidlohr Bueso
  2024-02-19 15:58 ` Thomas Gleixner
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2024-02-13 19:06 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart,
	Davidlohr Bueso, André Almeida, Shuah Khan
  Cc: linux-kernel, linux-kselftest, Mark Brown

The futex_requeue_pi test program is run a number of times with different
options to provide multiple test cases. Currently every time it runs it
reports the result with a consistent string, meaning that automated systems
parsing the TAP output from a test run have difficulty in distinguishing
which test is which.

The parameters used for the test are already logged as part of the test
output, let's use the same format to roll them into the test name that we
use with KTAP so that automated systems can follow the results of the
individual cases that get run.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/futex/functional/futex_requeue_pi.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
index 1ee5518ee6b7..7f3ca5c78df1 100644
--- a/tools/testing/selftests/futex/functional/futex_requeue_pi.c
+++ b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
@@ -17,6 +17,8 @@
  *
  *****************************************************************************/
 
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <limits.h>
 #include <pthread.h>
@@ -358,6 +360,7 @@ int unit_test(int broadcast, long lock, int third_party_owner, long timeout_ns)
 
 int main(int argc, char *argv[])
 {
+	const char *test_name;
 	int c, ret;
 
 	while ((c = getopt(argc, argv, "bchlot:v:")) != -1) {
@@ -397,6 +400,14 @@ int main(int argc, char *argv[])
 		"\tArguments: broadcast=%d locked=%d owner=%d timeout=%ldns\n",
 		broadcast, locked, owner, timeout_ns);
 
+	ret = asprintf(&test_name,
+		       "%s broadcast=%d locked=%d owner=%d timeout=%ldns",
+		       TEST_NAME, broadcast, locked, owner, timeout_ns);
+	if (ret < 0) {
+		ksft_print_msg("Failed to generate test name\n");
+		test_name = TEST_NAME;
+	}
+
 	/*
 	 * FIXME: unit_test is obsolete now that we parse options and the
 	 * various style of runs are done by run.sh - simplify the code and move
@@ -404,6 +415,6 @@ int main(int argc, char *argv[])
 	 */
 	ret = unit_test(broadcast, locked, owner, timeout_ns);
 
-	print_result(TEST_NAME, ret);
+	print_result(test_name, ret);
 	return ret;
 }

---
base-commit: 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478
change-id: 20240213-kselftest-futex-requeue-pi-unique-5a462303f6bc

Best regards,
-- 
Mark Brown <broonie@kernel.org>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi
  2024-02-13 19:06 [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi Mark Brown
@ 2024-02-14 21:08 ` Davidlohr Bueso
  2024-02-19 15:58 ` Thomas Gleixner
  1 sibling, 0 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2024-02-14 21:08 UTC (permalink / raw)
  To: Mark Brown
  Cc: Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart,
	Andr� Almeida, Shuah Khan, linux-kernel,
	linux-kselftest

On Tue, 13 Feb 2024, Mark Brown wrote:

>The futex_requeue_pi test program is run a number of times with different
>options to provide multiple test cases. Currently every time it runs it
>reports the result with a consistent string, meaning that automated systems
>parsing the TAP output from a test run have difficulty in distinguishing
>which test is which.
>
>The parameters used for the test are already logged as part of the test
>output, let's use the same format to roll them into the test name that we
>use with KTAP so that automated systems can follow the results of the
>individual cases that get run.
>
>Signed-off-by: Mark Brown <broonie@kernel.org>

Acked-by: Davidlohr Bueso <dave@stgolabs.net>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi
  2024-02-13 19:06 [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi Mark Brown
  2024-02-14 21:08 ` Davidlohr Bueso
@ 2024-02-19 15:58 ` Thomas Gleixner
  2024-02-19 19:53   ` Shuah Khan
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2024-02-19 15:58 UTC (permalink / raw)
  To: Mark Brown, Ingo Molnar, Peter Zijlstra, Darren Hart,
	Davidlohr Bueso, André Almeida, Shuah Khan
  Cc: linux-kernel, linux-kselftest, Mark Brown

On Tue, Feb 13 2024 at 19:06, Mark Brown wrote:
> The futex_requeue_pi test program is run a number of times with different
> options to provide multiple test cases. Currently every time it runs it
> reports the result with a consistent string, meaning that automated systems
> parsing the TAP output from a test run have difficulty in distinguishing
> which test is which.
>
> The parameters used for the test are already logged as part of the test
> output, let's use the same format to roll them into the test name that we
> use with KTAP so that automated systems can follow the results of the
> individual cases that get run.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>

Acked-by: Thomas Gleixner <tglx@linutronix.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi
  2024-02-19 15:58 ` Thomas Gleixner
@ 2024-02-19 19:53   ` Shuah Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2024-02-19 19:53 UTC (permalink / raw)
  To: Thomas Gleixner, Mark Brown, Ingo Molnar, Peter Zijlstra,
	Darren Hart, Davidlohr Bueso, André Almeida, Shuah Khan
  Cc: linux-kernel, linux-kselftest, Shuah Khan

On 2/19/24 08:58, Thomas Gleixner wrote:
> On Tue, Feb 13 2024 at 19:06, Mark Brown wrote:
>> The futex_requeue_pi test program is run a number of times with different
>> options to provide multiple test cases. Currently every time it runs it
>> reports the result with a consistent string, meaning that automated systems
>> parsing the TAP output from a test run have difficulty in distinguishing
>> which test is which.
>>
>> The parameters used for the test are already logged as part of the test
>> output, let's use the same format to roll them into the test name that we
>> use with KTAP so that automated systems can follow the results of the
>> individual cases that get run.
>>
>> Signed-off-by: Mark Brown <broonie@kernel.org>
> 
> Acked-by: Thomas Gleixner <tglx@linutronix.de>

Thank you. I will pick this up for Linux 6.9-rc1

thanks,
-- Shuah



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-19 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 19:06 [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi Mark Brown
2024-02-14 21:08 ` Davidlohr Bueso
2024-02-19 15:58 ` Thomas Gleixner
2024-02-19 19:53   ` Shuah Khan

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).