All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: Print the test we're running to /dev/kmsg
@ 2018-03-23  9:44 ` mpe
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2018-03-23  9:44 UTC (permalink / raw)
  To: shuahkh; +Cc: linux-kernel, linux-kselftest

Some tests cause the kernel to print things to the kernel log
buffer (ie. printk), in particular oops and warnings etc. However when
running all the tests in succession it's not always obvious which
test(s) caused the kernel to print something.

We can narrow it down by printing which test directory we're running
in to /dev/kmsg, if it's writable.

Example output:

  [  170.149149] kselftest: Running tests in powerpc
  [  305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left
  [  808.915456] kselftest: Running tests in pstore

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 tools/testing/selftests/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 7442dfb73b7f..0fbe778efd5f 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -130,6 +130,7 @@ ifdef INSTALL_PATH
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
 		echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
 		echo "echo ========================================" >> $(ALL_SCRIPT); \
+		echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
 		echo "cd $$TARGET" >> $(ALL_SCRIPT); \
 		make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
 		echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
-- 
2.14.1


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

* [PATCH] selftests: Print the test we're running to /dev/kmsg
@ 2018-03-23  9:44 ` mpe
  0 siblings, 0 replies; 6+ messages in thread
From: mpe @ 2018-03-23  9:44 UTC (permalink / raw)


Some tests cause the kernel to print things to the kernel log
buffer (ie. printk), in particular oops and warnings etc. However when
running all the tests in succession it's not always obvious which
test(s) caused the kernel to print something.

We can narrow it down by printing which test directory we're running
in to /dev/kmsg, if it's writable.

Example output:

  [  170.149149] kselftest: Running tests in powerpc
  [  305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left
  [  808.915456] kselftest: Running tests in pstore

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 tools/testing/selftests/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 7442dfb73b7f..0fbe778efd5f 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -130,6 +130,7 @@ ifdef INSTALL_PATH
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
 		echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
 		echo "echo ========================================" >> $(ALL_SCRIPT); \
+		echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
 		echo "cd $$TARGET" >> $(ALL_SCRIPT); \
 		make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
 		echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: Print the test we're running to /dev/kmsg
@ 2018-03-23  9:44 ` mpe
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2018-03-23  9:44 UTC (permalink / raw)


Some tests cause the kernel to print things to the kernel log
buffer (ie. printk), in particular oops and warnings etc. However when
running all the tests in succession it's not always obvious which
test(s) caused the kernel to print something.

We can narrow it down by printing which test directory we're running
in to /dev/kmsg, if it's writable.

Example output:

  [  170.149149] kselftest: Running tests in powerpc
  [  305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left
  [  808.915456] kselftest: Running tests in pstore

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 tools/testing/selftests/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 7442dfb73b7f..0fbe778efd5f 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -130,6 +130,7 @@ ifdef INSTALL_PATH
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
 		echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
 		echo "echo ========================================" >> $(ALL_SCRIPT); \
+		echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
 		echo "cd $$TARGET" >> $(ALL_SCRIPT); \
 		make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
 		echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: Print the test we're running to /dev/kmsg
  2018-03-23  9:44 ` mpe
  (?)
@ 2018-03-26 14:44   ` shuahkh
  -1 siblings, 0 replies; 6+ messages in thread
From: Shuah Khan @ 2018-03-26 14:44 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linux-kernel, linux-kselftest, Shuah Khan, Shuah Khan

On 03/23/2018 03:44 AM, Michael Ellerman wrote:
> Some tests cause the kernel to print things to the kernel log
> buffer (ie. printk), in particular oops and warnings etc. However when
> running all the tests in succession it's not always obvious which
> test(s) caused the kernel to print something.
> 
> We can narrow it down by printing which test directory we're running
> in to /dev/kmsg, if it's writable.
> 
> Example output:
> 
>   [  170.149149] kselftest: Running tests in powerpc
>   [  305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left
>   [  808.915456] kselftest: Running tests in pstore
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  tools/testing/selftests/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index 7442dfb73b7f..0fbe778efd5f 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -130,6 +130,7 @@ ifdef INSTALL_PATH
>  		BUILD_TARGET=$$BUILD/$$TARGET;	\
>  		echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
>  		echo "echo ========================================" >> $(ALL_SCRIPT); \
> +		echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
>  		echo "cd $$TARGET" >> $(ALL_SCRIPT); \
>  		make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
>  		echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
> 

Thanks Michael. I will get this to 4.17-rc1

-- Shuah

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

* [PATCH] selftests: Print the test we're running to /dev/kmsg
@ 2018-03-26 14:44   ` shuahkh
  0 siblings, 0 replies; 6+ messages in thread
From: shuahkh @ 2018-03-26 14:44 UTC (permalink / raw)


On 03/23/2018 03:44 AM, Michael Ellerman wrote:
> Some tests cause the kernel to print things to the kernel log
> buffer (ie. printk), in particular oops and warnings etc. However when
> running all the tests in succession it's not always obvious which
> test(s) caused the kernel to print something.
> 
> We can narrow it down by printing which test directory we're running
> in to /dev/kmsg, if it's writable.
> 
> Example output:
> 
>   [  170.149149] kselftest: Running tests in powerpc
>   [  305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left
>   [  808.915456] kselftest: Running tests in pstore
> 
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> ---
>  tools/testing/selftests/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index 7442dfb73b7f..0fbe778efd5f 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -130,6 +130,7 @@ ifdef INSTALL_PATH
>  		BUILD_TARGET=$$BUILD/$$TARGET;	\
>  		echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
>  		echo "echo ========================================" >> $(ALL_SCRIPT); \
> +		echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
>  		echo "cd $$TARGET" >> $(ALL_SCRIPT); \
>  		make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
>  		echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
> 

Thanks Michael. I will get this to 4.17-rc1

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: Print the test we're running to /dev/kmsg
@ 2018-03-26 14:44   ` shuahkh
  0 siblings, 0 replies; 6+ messages in thread
From: Shuah Khan @ 2018-03-26 14:44 UTC (permalink / raw)


On 03/23/2018 03:44 AM, Michael Ellerman wrote:
> Some tests cause the kernel to print things to the kernel log
> buffer (ie. printk), in particular oops and warnings etc. However when
> running all the tests in succession it's not always obvious which
> test(s) caused the kernel to print something.
> 
> We can narrow it down by printing which test directory we're running
> in to /dev/kmsg, if it's writable.
> 
> Example output:
> 
>   [  170.149149] kselftest: Running tests in powerpc
>   [  305.300132] kworker/dying (71) used greatest stack depth: 7776 bytes left
>   [  808.915456] kselftest: Running tests in pstore
> 
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> ---
>  tools/testing/selftests/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index 7442dfb73b7f..0fbe778efd5f 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -130,6 +130,7 @@ ifdef INSTALL_PATH
>  		BUILD_TARGET=$$BUILD/$$TARGET;	\
>  		echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \
>  		echo "echo ========================================" >> $(ALL_SCRIPT); \
> +		echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
>  		echo "cd $$TARGET" >> $(ALL_SCRIPT); \
>  		make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \
>  		echo "cd \$$ROOT" >> $(ALL_SCRIPT); \
> 

Thanks Michael. I will get this to 4.17-rc1

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-03-26 14:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23  9:44 [PATCH] selftests: Print the test we're running to /dev/kmsg Michael Ellerman
2018-03-23  9:44 ` Michael Ellerman
2018-03-23  9:44 ` mpe
2018-03-26 14:44 ` Shuah Khan
2018-03-26 14:44   ` Shuah Khan
2018-03-26 14:44   ` shuahkh

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.