acrn-kernel/tools/testing/kunit/test_data
Daniel Latypov dbf0b0d53a kunit: tool: make parser stop overwriting status of suites w/ no_tests
Consider this invocation
$ ./tools/testing/kunit/kunit.py parse <<EOF
  TAP version 14
  1..2
  ok 1 - suite
    # Subtest: no_tests_suite
    # catastrophic error!
  not ok 1 - no_tests_suite
EOF

It will have a 0 exit code even though there's a "not ok".

Consider this one:
$ ./tools/testing/kunit/kunit.py parse <<EOF
  TAP version 14
  1..2
  ok 1 - suite
  not ok 1 - no_tests_suite
EOF

It will a non-zero exit code.

Why?
We have this line in the kunit_parser.py
> parent_test = parse_test_header(lines, test)
where we have special handling when we see "# Subtest" and we ignore the
explicit reported "not ok 1" status!

Also, NO_TESTS at a suite-level only results in a non-zero status code
where then there's only one suite atm.

This change is the minimal one to make sure we don't overwrite it.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-05-16 13:22:12 -06:00
..
test_config_printk_time.log
test_insufficient_memory.log
test_interrupted_tap_output.log
test_is_test_passed-all_passed.log
test_is_test_passed-all_passed_nested.log kunit: tool: improve compatibility of kunit_parser with KTAP specification 2021-10-19 14:22:02 -06:00
test_is_test_passed-failure.log
test_is_test_passed-kselftest.log kunit: tool: improve compatibility of kunit_parser with KTAP specification 2021-10-19 14:22:02 -06:00
test_is_test_passed-missing_plan.log kunit: tool: improve compatibility of kunit_parser with KTAP specification 2021-10-19 14:22:02 -06:00
test_is_test_passed-no_tests_no_plan.log kunit: tool: make parser stop overwriting status of suites w/ no_tests 2022-05-16 13:22:12 -06:00
test_is_test_passed-no_tests_run_no_header.log
test_is_test_passed-no_tests_run_with_header.log
test_kernel_panic_interrupt.log
test_multiple_prefixes.log
test_output_isolated_correctly.log
test_output_with_prefix_isolated_correctly.log
test_pound_no_prefix.log
test_pound_sign.log
test_read_from_file.kconfig
test_skip_all_tests.log
test_skip_tests.log
test_strip_hyphen.log kunit: tool: improve compatibility of kunit_parser with KTAP specification 2021-10-19 14:22:02 -06:00