linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] kunit: support running subsets of test suites from kunit.py
@ 2021-02-04 22:54 Daniel Latypov
  2021-02-04 22:54 ` [PATCH v3 1/3] kunit: add kunit.filter_glob cmdline option to filter suites Daniel Latypov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Daniel Latypov @ 2021-02-04 22:54 UTC (permalink / raw)
  To: brendanhiggins, davidgow
  Cc: linux-kernel, linux-kselftest, skhan, Daniel Latypov

When using `kunit.py run` to run tests, users must populate a
`kunitconfig` file to select the options the tests are hidden behind and
all their dependencies.

The patch [1] to allow specifying a path to kunitconfig promises to make
this nicer as we can have checked in files corresponding to different
sets of tests.

But it's still annoying 
1) when trying to run a subet of tests
2) when you want to run tests that don't have such a pre-existing
kunitconfig and selecting all the necessary options is tricky.

This patch series aims to alleviate both:
1) `kunit.py run 'my-suite-*'`
I.e. use my current kunitconfig, but just run suites that match this glob
2) `kunit.py run --alltests 'my-suite-*'`
I.e. use allyesconfig so I don't have to worry about writing a
kunitconfig at all.

See the first commit message for more details and discussion about
future work.

This patch series also includes a bugfix for a latent bug that can't be
triggered right now but has worse consequences as a result of the
changes needed to plumb in this suite name glob.

[1] https://lore.kernel.org/linux-kselftest/20210201205514.3943096-1-dlatypov@google.com/

---
v1 -> v2:
  Fix free of `suites` subarray in suite_set.
  Found by Dan Carpenter and kernel test robot.
v2 -> v3:
  Add MODULE_PARM_DESC() for kunit.filter_glob.

Daniel Latypov (3):
  kunit: add kunit.filter_glob cmdline option to filter suites
  kunit: tool: add support for filtering suites by glob
  kunit: tool: fix unintentional statefulness in run_kernel()

 lib/kunit/Kconfig                   |  1 +
 lib/kunit/executor.c                | 93 ++++++++++++++++++++++++++---
 tools/testing/kunit/kunit.py        | 21 +++++--
 tools/testing/kunit/kunit_kernel.py |  6 +-
 4 files changed, 106 insertions(+), 15 deletions(-)


base-commit: 88bb507a74ea7d75fa49edd421eaa710a7d80598
-- 
2.30.0.478.g8a0d178c01-goog


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

end of thread, other threads:[~2021-02-06  3:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 22:54 [PATCH v3 0/3] kunit: support running subsets of test suites from kunit.py Daniel Latypov
2021-02-04 22:54 ` [PATCH v3 1/3] kunit: add kunit.filter_glob cmdline option to filter suites Daniel Latypov
2021-02-04 22:54 ` [PATCH v3 2/3] kunit: tool: add support for filtering suites by glob Daniel Latypov
2021-02-04 22:54 ` [PATCH v3 3/3] kunit: tool: fix unintentional statefulness in run_kernel() Daniel Latypov
2021-02-05 23:51 ` [PATCH v3 0/3] kunit: support running subsets of test suites from kunit.py 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).