linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] kunit: Don't fail test suites if one of them is empty
@ 2020-10-15 16:28 Andy Shevchenko
  2020-10-20 21:29 ` Brendan Higgins
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2020-10-15 16:28 UTC (permalink / raw)
  To: Brendan Higgins, linux-kselftest, Shuah Khan, kunit-dev; +Cc: Andy Shevchenko

Empty test suite is okay test suite.

Don't fail the rest of the test suites if one of them is empty.

Fixes: 6ebf5866f2e8 ("kunit: tool: add Python wrappers for running KUnit tests")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 tools/testing/kunit/kunit_parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
index 8019e3dd4c32..12b9fc652ef6 100644
--- a/tools/testing/kunit/kunit_parser.py
+++ b/tools/testing/kunit/kunit_parser.py
@@ -242,7 +242,7 @@ def parse_test_suite(lines: List[str], expected_suite_index: int) -> TestSuite:
 		return None
 	test_suite.name = name
 	expected_test_case_num = parse_subtest_plan(lines)
-	if not expected_test_case_num:
+	if expected_test_case_num is None:
 		return None
 	while expected_test_case_num > 0:
 		test_case = parse_test_case(lines)
-- 
2.28.0


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

* Re: [PATCH v1] kunit: Don't fail test suites if one of them is empty
  2020-10-15 16:28 [PATCH v1] kunit: Don't fail test suites if one of them is empty Andy Shevchenko
@ 2020-10-20 21:29 ` Brendan Higgins
  0 siblings, 0 replies; 2+ messages in thread
From: Brendan Higgins @ 2020-10-20 21:29 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan, KUnit Development

On Thu, Oct 15, 2020 at 9:28 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Empty test suite is okay test suite.
>
> Don't fail the rest of the test suites if one of them is empty.
>
> Fixes: 6ebf5866f2e8 ("kunit: tool: add Python wrappers for running KUnit tests")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Nice catch! Thanks!

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>

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

end of thread, other threads:[~2020-10-20 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 16:28 [PATCH v1] kunit: Don't fail test suites if one of them is empty Andy Shevchenko
2020-10-20 21:29 ` Brendan Higgins

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