Skip to contentSkip to conversation

kunit: Fix kunit.py --raw_output option

PATCH In review David Gow 3 participants 3 messages Oct 22, 2020 – Oct 26, 2020

Subsystems (2)
lore
Share & tools
lore

David Gow

author
#0 lore raw

PATCH 1/1 kunit: Fix kunit.py --raw_output option

Due to the raw_output() function on kunit_parser.py actually being a generator, it only runs if something reads the lines it returns. Since we no-longer do that (parsing doesn't actually happen if raw_output is enabled), it was not printing anything.

Fixes 45ba7a893ad89114e773b3dc32f6431354c465d6 ("kunit: kunit_tool: Separate out config/build/exec/parse")
---
 tools/testing/kunit/kunit_parser.py | 1 -
 1 file changed, 1 deletion(-)
tools/testing/kunit/kunit_parser.py +0 -1
index 8019e3dd4c32..744ee9cb0073 100644
@@ -66,7 +66,6 @@ def isolate_kunit_output(kernel_output):
 def raw_output(kernel_output):
 	for line in kernel_output:
 		print(line)
-		yield line
 
 DIVIDER = '=' * 60
 
Signature · 1 line
2.29.0.rc1.297.gfa9743e501-goog
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 8 lines · David Gow

Due to the raw_output() function on kunit_parser.py actually being a generator, it only runs if something reads the lines it returns. Since we no-longer do that (parsing doesn't actually happen if raw_output is enabled), it was not printing anything.

Fixes 45ba7a893ad89114e773b3dc32f6431354c465d6 ("kunit: kunit_tool: Separate out config/build/exec/parse")

Thanks for fixing this!

maintainer
#2 lore raw
Quoted 8 lines · Brendan Higgins
Quoted 7 lines · David Gow

Due to the raw_output() function on kunit_parser.py actually being a generator, it only runs if something reads the lines it returns. Since we no-longer do that (parsing doesn't actually happen if raw_output is enabled), it was not printing anything.

Fixes 45ba7a893ad89114e773b3dc32f6431354c465d6 ("kunit: kunit_tool: Separate out config/build/exec/parse")

You need just the SHA1 45ba7a893ad8

Fixed this up and applied to linux-kselftest kunit-fixes branch

Quoted 7 lines
Quoted 1 line

Thanks for fixing this!

thanks,
-- Shuah