Skip to contentSkip to conversation

kunit: tool: Accept --raw_output=full as an alias of 'all'

PATCH In review David Gow 2 participants 2 messages Jul 30, 2025 – Jul 31, 2025

Subsystems (2)
lore
Share & tools
lore

David Gow

author
#0 lore raw

PATCH 1/1 kunit: tool: Accept --raw_output=full as an alias of 'all'

I can never remember whether --raw_output takes 'all' or 'full'. No reason we can't support both.

For the record, 'all' is the recommended, documented option.

---
 tools/testing/kunit/kunit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/kunit/kunit.py +2 -2
index 7f9ae55fd6d5..cd99c1956331 100755
@@ -228,7 +228,7 @@ def parse_tests(request: KunitParseRequest, metadata: kunit_json.Metadata, input
 		fake_test.counts.passed = 1
 
 		output: Iterable[str] = input_data
-		if request.raw_output == 'all':
+		if request.raw_output == 'all' or request.raw_output == 'full':
 			pass
 		elif request.raw_output == 'kunit':
 			output = kunit_parser.extract_tap_lines(output)
@@ -425,7 +425,7 @@ def add_parse_opts(parser: argparse.ArgumentParser) -> None:
 	parser.add_argument('--raw_output', help='If set don\'t parse output from kernel. '
 			    'By default, filters to just KUnit output. Use '
 			    '--raw_output=all to show everything',
-			     type=str, nargs='?', const='all', default=None, choices=['all', 'kunit'])
+			     type=str, nargs='?', const='all', default=None, choices=['all', 'full', 'kunit'])
 	parser.add_argument('--json',
 			    nargs='?',
 			    help='Prints parsed test results as JSON to stdout or a file if '
Signature · 1 line
2.50.1.552.g942d659e1b-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · David Gow

I can never remember whether --raw_output takes 'all' or 'full'. No reason we can't support both.

For the record, 'all' is the recommended, documented option.

Hello!

Happy to add the ability to use 'full'. Thanks!

Quoted 29 lines
---
 tools/testing/kunit/kunit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/kunit/kunit.py +2 -3
index 7f9ae55fd6d5..cd99c1956331 100755
@@ -228,7 +228,7 @@ def parse_tests(request: KunitParseRequest, metadata: kunit_json.Metadata, input
                fake_test.counts.passed = 1
 
                output: Iterable[str] = input_data
-               if request.raw_output == 'all':
+               if request.raw_output == 'all' or request.raw_output == 'full':
                        pass
                elif request.raw_output == 'kunit':
                        output = kunit_parser.extract_tap_lines(output)
@@ -425,7 +425,7 @@ def add_parse_opts(parser: argparse.ArgumentParser) -> None:
        parser.add_argument('--raw_output', help='If set don\'t parse output from kernel. '
                            'By default, filters to just KUnit output. Use '
                            '--raw_output=all to show everything',
-                            type=str, nargs='?', const='all', default=None, choices=['all', 'kunit'])
+                            type=str, nargs='?', const='all', default=None, choices=['all', 'full', 'kunit'])
        parser.add_argument('--json',
                            nargs='?',
                            help='Prints parsed test results as JSON to stdout or a file if '
--

2.50.1.552.g942d659e1b-goog