linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kunit: tool: Accept --raw_output=full as an alias of 'all'
@ 2025-07-30  3:16 David Gow
  2025-07-31 19:03 ` Rae Moar
  0 siblings, 1 reply; 2+ messages in thread
From: David Gow @ 2025-07-30  3:16 UTC (permalink / raw)
  To: Rae Moar, Brendan Higgins, Shuah Khan
  Cc: linux-kselftest, kunit-dev, linux-kernel, 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.

Signed-off-by: David Gow <davidgow@google.com>
---
 tools/testing/kunit/kunit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/kunit/kunit.py b/tools/testing/kunit/kunit.py
index 7f9ae55fd6d5..cd99c1956331 100755
--- a/tools/testing/kunit/kunit.py
+++ b/tools/testing/kunit/kunit.py
@@ -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


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

* Re: [PATCH] kunit: tool: Accept --raw_output=full as an alias of 'all'
  2025-07-30  3:16 [PATCH] kunit: tool: Accept --raw_output=full as an alias of 'all' David Gow
@ 2025-07-31 19:03 ` Rae Moar
  0 siblings, 0 replies; 2+ messages in thread
From: Rae Moar @ 2025-07-31 19:03 UTC (permalink / raw)
  To: David Gow
  Cc: Brendan Higgins, Shuah Khan, linux-kselftest, kunit-dev,
	linux-kernel

On Tue, Jul 29, 2025 at 11:16 PM David Gow <davidgow@google.com> wrote:
>
> 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.
>
> Signed-off-by: David Gow <davidgow@google.com>

Hello!

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

Reviewed-by: Rae Moar <rmoar@google.com>

> ---
>  tools/testing/kunit/kunit.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/kunit/kunit.py b/tools/testing/kunit/kunit.py
> index 7f9ae55fd6d5..cd99c1956331 100755
> --- a/tools/testing/kunit/kunit.py
> +++ b/tools/testing/kunit/kunit.py
> @@ -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
>

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

end of thread, other threads:[~2025-07-31 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30  3:16 [PATCH] kunit: tool: Accept --raw_output=full as an alias of 'all' David Gow
2025-07-31 19:03 ` Rae Moar

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