diff options
author | Daniel Latypov <dlatypov@google.com> | 2021-04-20 19:04:27 -0700 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2021-06-25 11:44:37 -0600 |
commit | 1d71307a6f94df3750f8f884545a769e227172fe (patch) | |
tree | 5999bd6b588476c335c78f2b419c2a9c31fc249f /lib/genalloc.c | |
parent | 40eb5cf4cc913dbb615eb97d05f2353f0404a464 (diff) | |
download | linux-1d71307a6f94df3750f8f884545a769e227172fe.tar.bz2 |
kunit: add unit test for filtering suites by names
This adds unit tests for kunit_filter_subsuite() and
kunit_filter_suites().
Note: what the executor means by "subsuite" is the array of suites
corresponding to each test file.
This patch lightly refactors executor.c to avoid the use of global
variables to make it testable.
It also includes a clever `kfree_at_end()` helper that makes this test
easier to write than it otherwise would have been.
Tested by running just the new tests using itself
$ ./tools/testing/kunit/kunit.py run '*exec*'
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Acked-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions