Skip to content

Reorganize string-stream and assert tests

Ivan Orlov linux-kselftest lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 9 repliesIn review
  2. v15 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Patch which exports the non-static assert.c functions is replaced with the patch which prepares assert_test.c to be merged into kunit-test.c
- Also, David Gow <[email protected]> suggested merging 4th and 5th patches together, but since now the 4th patch does more than it used to do, I send it separately

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5kunit: string-stream: export non-static functionslib/kunit/string-stream.c+11 -11 reply
2/5kunit: kunit-test: Remove stub for log testslib/kunit/kunit-test.c+1 -171 reply
3/5kunit: string-stream-test: Make it a separate modulelib/kunit/Kconfig lib/kunit/Makefile lib/kunit/string-stream-test.c+11 -14 replies
4/5kunit: assert_test: Prepare to be merged into kunit-test.cinclude/kunit/assert.h lib/kunit/assert.c lib/kunit/assert_test.c+35 -281 reply
5/5kunit: Merge assertion test into kunit-test.clib/kunit/Makefile lib/kunit/assert_test.c lib/kunit/kunit-test.c+378 -3942 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchDavid GowRae Moar
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] Reorganize string-stream and assert tests

Currently, we can run string-stream and assertion tests only when they are built into the kernel (with config options = y), since some of the symbols (string-stream functions and functions from assert.c) are not exported into any of the namespaces, therefore they are not accessible for the modules.

This patch series exports the required symbols into the KUnit namespace. Also, it makes the string-stream test a separate module and removes the log test stub from kunit-test since now we can access the string-stream symbols even if the test which uses it is built as a module.

Additionally, this patch series merges the assertion test suite into the kunit-test, since assert.c (and all of the assertion formatting functions in it) is a part of the KUnit core.

V1 -> V2:
- Patch which exports the non-static assert.c functions is replaced with the patch which prepares assert_test.c to be merged into kunit-test.c
- Also, David Gow <[email protected]> suggested merging 4th and 5th patches together, but since now the 4th patch does more than it used to do, I send it separately

Ivan Orlov (5):
kunit: string-stream: export non-static functions
kunit: kunit-test: Remove stub for log tests
kunit: string-stream-test: Make it a separate module
kunit: assert_test: Prepare to be merged into kunit-test.c
kunit: Merge assertion test into kunit-test.c

 include/kunit/assert.h         |   4 +-
 lib/kunit/Kconfig              |   8 +
 lib/kunit/Makefile             |   7 +-
 lib/kunit/assert.c             |  19 +-
 lib/kunit/assert_test.c        | 388 --------------------------------
 lib/kunit/kunit-test.c         | 397 +++++++++++++++++++++++++++++++--
 lib/kunit/string-stream-test.c |   2 +
 lib/kunit/string-stream.c      |  12 +-
 8 files changed, 416 insertions(+), 421 deletions(-)
 delete mode 100644 lib/kunit/assert_test.c
Signature · 1 line
2.34.1