public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: tpm2: redirect python unittest logs to stdout
@ 2024-07-10  8:15 Muhammad Usama Anjum
  2024-07-31 13:42 ` Muhammad Usama Anjum
  0 siblings, 1 reply; 7+ messages in thread
From: Muhammad Usama Anjum @ 2024-07-10  8:15 UTC (permalink / raw)
  To: Shuah Khan, Muhammad Usama Anjum
  Cc: kernel, Jarkko Sakkinen, linux-kselftest, linux-kernel

The python unittest module writes all its output to stderr, even when
the run is clean. Redirect its output logs to stdout.

Cc: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
 tools/testing/selftests/tpm2/test_async.sh | 2 +-
 tools/testing/selftests/tpm2/test_smoke.sh | 2 +-
 tools/testing/selftests/tpm2/test_space.sh | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/tpm2/test_async.sh b/tools/testing/selftests/tpm2/test_async.sh
index 43bf5bd772fd4..cf5a9c826097b 100755
--- a/tools/testing/selftests/tpm2/test_async.sh
+++ b/tools/testing/selftests/tpm2/test_async.sh
@@ -7,4 +7,4 @@ ksft_skip=4
 [ -e /dev/tpm0 ] || exit $ksft_skip
 [ -e /dev/tpmrm0 ] || exit $ksft_skip
 
-python3 -m unittest -v tpm2_tests.AsyncTest
+python3 -m unittest -v tpm2_tests.AsyncTest 2>&1
diff --git a/tools/testing/selftests/tpm2/test_smoke.sh b/tools/testing/selftests/tpm2/test_smoke.sh
index 58af963e5b55a..20fa70f970a9a 100755
--- a/tools/testing/selftests/tpm2/test_smoke.sh
+++ b/tools/testing/selftests/tpm2/test_smoke.sh
@@ -6,4 +6,4 @@ ksft_skip=4
 
 [ -e /dev/tpm0 ] || exit $ksft_skip
 
-python3 -m unittest -v tpm2_tests.SmokeTest
+python3 -m unittest -v tpm2_tests.SmokeTest 2>&1
diff --git a/tools/testing/selftests/tpm2/test_space.sh b/tools/testing/selftests/tpm2/test_space.sh
index 04c47b13fe8ac..93894cbc89a80 100755
--- a/tools/testing/selftests/tpm2/test_space.sh
+++ b/tools/testing/selftests/tpm2/test_space.sh
@@ -6,4 +6,4 @@ ksft_skip=4
 
 [ -e /dev/tpmrm0 ] || exit $ksft_skip
 
-python3 -m unittest -v tpm2_tests.SpaceTest
+python3 -m unittest -v tpm2_tests.SpaceTest 2>&1
-- 
2.39.2


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

* Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout
  2024-07-10  8:15 [PATCH] selftests: tpm2: redirect python unittest logs to stdout Muhammad Usama Anjum
@ 2024-07-31 13:42 ` Muhammad Usama Anjum
  2024-07-31 17:45   ` Shuah Khan
  2024-08-01 22:23   ` Jarkko Sakkinen
  0 siblings, 2 replies; 7+ messages in thread
From: Muhammad Usama Anjum @ 2024-07-31 13:42 UTC (permalink / raw)
  To: Shuah Khan, Jarkko Sakkinen
  Cc: Muhammad Usama Anjum, kernel, linux-kselftest, linux-kernel

Reminder

On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote:
> The python unittest module writes all its output to stderr, even when
> the run is clean. Redirect its output logs to stdout.
> 
> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
>  tools/testing/selftests/tpm2/test_async.sh | 2 +-
>  tools/testing/selftests/tpm2/test_smoke.sh | 2 +-
>  tools/testing/selftests/tpm2/test_space.sh | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/tpm2/test_async.sh b/tools/testing/selftests/tpm2/test_async.sh
> index 43bf5bd772fd4..cf5a9c826097b 100755
> --- a/tools/testing/selftests/tpm2/test_async.sh
> +++ b/tools/testing/selftests/tpm2/test_async.sh
> @@ -7,4 +7,4 @@ ksft_skip=4
>  [ -e /dev/tpm0 ] || exit $ksft_skip
>  [ -e /dev/tpmrm0 ] || exit $ksft_skip
>  
> -python3 -m unittest -v tpm2_tests.AsyncTest
> +python3 -m unittest -v tpm2_tests.AsyncTest 2>&1
> diff --git a/tools/testing/selftests/tpm2/test_smoke.sh b/tools/testing/selftests/tpm2/test_smoke.sh
> index 58af963e5b55a..20fa70f970a9a 100755
> --- a/tools/testing/selftests/tpm2/test_smoke.sh
> +++ b/tools/testing/selftests/tpm2/test_smoke.sh
> @@ -6,4 +6,4 @@ ksft_skip=4
>  
>  [ -e /dev/tpm0 ] || exit $ksft_skip
>  
> -python3 -m unittest -v tpm2_tests.SmokeTest
> +python3 -m unittest -v tpm2_tests.SmokeTest 2>&1
> diff --git a/tools/testing/selftests/tpm2/test_space.sh b/tools/testing/selftests/tpm2/test_space.sh
> index 04c47b13fe8ac..93894cbc89a80 100755
> --- a/tools/testing/selftests/tpm2/test_space.sh
> +++ b/tools/testing/selftests/tpm2/test_space.sh
> @@ -6,4 +6,4 @@ ksft_skip=4
>  
>  [ -e /dev/tpmrm0 ] || exit $ksft_skip
>  
> -python3 -m unittest -v tpm2_tests.SpaceTest
> +python3 -m unittest -v tpm2_tests.SpaceTest 2>&1

-- 
BR,
Muhammad Usama Anjum

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

* Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout
  2024-07-31 13:42 ` Muhammad Usama Anjum
@ 2024-07-31 17:45   ` Shuah Khan
  2024-08-01 22:24     ` Jarkko Sakkinen
  2024-08-01 22:23   ` Jarkko Sakkinen
  1 sibling, 1 reply; 7+ messages in thread
From: Shuah Khan @ 2024-07-31 17:45 UTC (permalink / raw)
  To: Muhammad Usama Anjum, Shuah Khan, Jarkko Sakkinen
  Cc: kernel, linux-kselftest, linux-kernel, Shuah Khan

On 7/31/24 07:42, Muhammad Usama Anjum wrote:
> Reminder
> 

top post???

> On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote:
>> The python unittest module writes all its output to stderr, even when
>> the run is clean. Redirect its output logs to stdout.
>>
>> Cc: Jarkko Sakkinen <jarkko@kernel.org>
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>> ---
>>   tools/testing/selftests/tpm2/test_async.sh | 2 +-
>>   tools/testing/selftests/tpm2/test_smoke.sh | 2 +-
>>   tools/testing/selftests/tpm2/test_space.sh | 2 +-
>>   3 files changed, 3 insertions(+), 3 deletions(-)
>>

Applied to linux-kselftest next for Linux 6.12-rc1

thanks,
-- Shuah


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

* Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout
  2024-07-31 13:42 ` Muhammad Usama Anjum
  2024-07-31 17:45   ` Shuah Khan
@ 2024-08-01 22:23   ` Jarkko Sakkinen
  1 sibling, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2024-08-01 22:23 UTC (permalink / raw)
  To: Muhammad Usama Anjum, Shuah Khan; +Cc: kernel, linux-kselftest, linux-kernel

On Wed Jul 31, 2024 at 4:42 PM EEST, Muhammad Usama Anjum wrote:
> Reminder
>
> On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote:
> > The python unittest module writes all its output to stderr, even when
> > the run is clean. Redirect its output logs to stdout.
> > 
> > Cc: Jarkko Sakkinen <jarkko@kernel.org>
> > Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> > ---
> >  tools/testing/selftests/tpm2/test_async.sh | 2 +-
> >  tools/testing/selftests/tpm2/test_smoke.sh | 2 +-
> >  tools/testing/selftests/tpm2/test_space.sh | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/tpm2/test_async.sh b/tools/testing/selftests/tpm2/test_async.sh
> > index 43bf5bd772fd4..cf5a9c826097b 100755
> > --- a/tools/testing/selftests/tpm2/test_async.sh
> > +++ b/tools/testing/selftests/tpm2/test_async.sh
> > @@ -7,4 +7,4 @@ ksft_skip=4
> >  [ -e /dev/tpm0 ] || exit $ksft_skip
> >  [ -e /dev/tpmrm0 ] || exit $ksft_skip
> >  
> > -python3 -m unittest -v tpm2_tests.AsyncTest
> > +python3 -m unittest -v tpm2_tests.AsyncTest 2>&1
> > diff --git a/tools/testing/selftests/tpm2/test_smoke.sh b/tools/testing/selftests/tpm2/test_smoke.sh
> > index 58af963e5b55a..20fa70f970a9a 100755
> > --- a/tools/testing/selftests/tpm2/test_smoke.sh
> > +++ b/tools/testing/selftests/tpm2/test_smoke.sh
> > @@ -6,4 +6,4 @@ ksft_skip=4
> >  
> >  [ -e /dev/tpm0 ] || exit $ksft_skip
> >  
> > -python3 -m unittest -v tpm2_tests.SmokeTest
> > +python3 -m unittest -v tpm2_tests.SmokeTest 2>&1
> > diff --git a/tools/testing/selftests/tpm2/test_space.sh b/tools/testing/selftests/tpm2/test_space.sh
> > index 04c47b13fe8ac..93894cbc89a80 100755
> > --- a/tools/testing/selftests/tpm2/test_space.sh
> > +++ b/tools/testing/selftests/tpm2/test_space.sh
> > @@ -6,4 +6,4 @@ ksft_skip=4
> >  
> >  [ -e /dev/tpmrm0 ] || exit $ksft_skip
> >  
> > -python3 -m unittest -v tpm2_tests.SpaceTest
> > +python3 -m unittest -v tpm2_tests.SpaceTest 2>&1

I was on holiday for four weeks so thus the latency. And also
mbsync failed on me for sometime:

https://social.kernel.org/notice/AkX1oAnWFMXja3uN84

Anyway, agreeing with the code changes but I think this
categorizes as a bug so please add the fixes tag and send
v2.

BR, Jarkko

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

* Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout
  2024-07-31 17:45   ` Shuah Khan
@ 2024-08-01 22:24     ` Jarkko Sakkinen
  2024-08-01 22:58       ` Shuah Khan
  0 siblings, 1 reply; 7+ messages in thread
From: Jarkko Sakkinen @ 2024-08-01 22:24 UTC (permalink / raw)
  To: Shuah Khan, Muhammad Usama Anjum, Shuah Khan
  Cc: kernel, linux-kselftest, linux-kernel

On Wed Jul 31, 2024 at 8:45 PM EEST, Shuah Khan wrote:
> On 7/31/24 07:42, Muhammad Usama Anjum wrote:
> > Reminder
> > 
>
> top post???
>
> > On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote:
> >> The python unittest module writes all its output to stderr, even when
> >> the run is clean. Redirect its output logs to stdout.
> >>
> >> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> >> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> >> ---
> >>   tools/testing/selftests/tpm2/test_async.sh | 2 +-
> >>   tools/testing/selftests/tpm2/test_smoke.sh | 2 +-
> >>   tools/testing/selftests/tpm2/test_space.sh | 2 +-
> >>   3 files changed, 3 insertions(+), 3 deletions(-)
> >>
>
> Applied to linux-kselftest next for Linux 6.12-rc1
>
> thanks,
> -- Shuah

OK, great. Maybe it is not *that* critical to backport this.

BR, Jarkko

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

* Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout
  2024-08-01 22:24     ` Jarkko Sakkinen
@ 2024-08-01 22:58       ` Shuah Khan
  2024-08-02 17:46         ` Jarkko Sakkinen
  0 siblings, 1 reply; 7+ messages in thread
From: Shuah Khan @ 2024-08-01 22:58 UTC (permalink / raw)
  To: Jarkko Sakkinen, Muhammad Usama Anjum, Shuah Khan
  Cc: kernel, linux-kselftest, linux-kernel, Shuah Khan

On 8/1/24 16:24, Jarkko Sakkinen wrote:
> On Wed Jul 31, 2024 at 8:45 PM EEST, Shuah Khan wrote:
>> On 7/31/24 07:42, Muhammad Usama Anjum wrote:
>>> Reminder
>>>
>>
>> top post???
>>
>>> On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote:
>>>> The python unittest module writes all its output to stderr, even when
>>>> the run is clean. Redirect its output logs to stdout.
>>>>
>>>> Cc: Jarkko Sakkinen <jarkko@kernel.org>
>>>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>>>> ---
>>>>    tools/testing/selftests/tpm2/test_async.sh | 2 +-
>>>>    tools/testing/selftests/tpm2/test_smoke.sh | 2 +-
>>>>    tools/testing/selftests/tpm2/test_space.sh | 2 +-
>>>>    3 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>
>> Applied to linux-kselftest next for Linux 6.12-rc1
>>
>> thanks,
>> -- Shuah
> 
> OK, great. Maybe it is not *that* critical to backport this.
> 

I took the liberty to pull this in. I agree that this doesn't need
backport. It suppresses messages and doesn't really fix any bug.

I tested it to make sure it doesn't suppress important messages.

thanks,
-- Shuah


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

* Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout
  2024-08-01 22:58       ` Shuah Khan
@ 2024-08-02 17:46         ` Jarkko Sakkinen
  0 siblings, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2024-08-02 17:46 UTC (permalink / raw)
  To: Shuah Khan, Jarkko Sakkinen, Muhammad Usama Anjum, Shuah Khan
  Cc: kernel, linux-kselftest, linux-kernel

On Fri Aug 2, 2024 at 1:58 AM EEST, Shuah Khan wrote:
> On 8/1/24 16:24, Jarkko Sakkinen wrote:
> > On Wed Jul 31, 2024 at 8:45 PM EEST, Shuah Khan wrote:
> >> On 7/31/24 07:42, Muhammad Usama Anjum wrote:
> >>> Reminder
> >>>
> >>
> >> top post???
> >>
> >>> On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote:
> >>>> The python unittest module writes all its output to stderr, even when
> >>>> the run is clean. Redirect its output logs to stdout.
> >>>>
> >>>> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> >>>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> >>>> ---
> >>>>    tools/testing/selftests/tpm2/test_async.sh | 2 +-
> >>>>    tools/testing/selftests/tpm2/test_smoke.sh | 2 +-
> >>>>    tools/testing/selftests/tpm2/test_space.sh | 2 +-
> >>>>    3 files changed, 3 insertions(+), 3 deletions(-)
> >>>>
> >>
> >> Applied to linux-kselftest next for Linux 6.12-rc1
> >>
> >> thanks,
> >> -- Shuah
> > 
> > OK, great. Maybe it is not *that* critical to backport this.
> > 
>
> I took the liberty to pull this in. I agree that this doesn't need
> backport. It suppresses messages and doesn't really fix any bug.
>
> I tested it to make sure it doesn't suppress important messages.

OK, great thanks a lot!

>
> thanks,
> -- Shuah

BR, Jarkko


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

end of thread, other threads:[~2024-08-02 17:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10  8:15 [PATCH] selftests: tpm2: redirect python unittest logs to stdout Muhammad Usama Anjum
2024-07-31 13:42 ` Muhammad Usama Anjum
2024-07-31 17:45   ` Shuah Khan
2024-08-01 22:24     ` Jarkko Sakkinen
2024-08-01 22:58       ` Shuah Khan
2024-08-02 17:46         ` Jarkko Sakkinen
2024-08-01 22:23   ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox