linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Reorganize string-stream and assert tests
@ 2024-06-18 17:03 Ivan Orlov
  2024-06-18 17:03 ` [PATCH v2 1/5] kunit: string-stream: export non-static functions Ivan Orlov
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Ivan Orlov @ 2024-06-18 17:03 UTC (permalink / raw)
  To: brendan.higgins, davidgow, rmoar
  Cc: Ivan Orlov, linux-kselftest, kunit-dev, linux-kernel, skhan

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 <davidgow@google.com> 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

-- 
2.34.1


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

end of thread, other threads:[~2024-06-27 20:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-18 17:03 [PATCH v2 0/5] Reorganize string-stream and assert tests Ivan Orlov
2024-06-18 17:03 ` [PATCH v2 1/5] kunit: string-stream: export non-static functions Ivan Orlov
2024-06-21 21:00   ` Rae Moar
2024-06-18 17:03 ` [PATCH v2 2/5] kunit: kunit-test: Remove stub for log tests Ivan Orlov
2024-06-21 21:03   ` Rae Moar
2024-06-18 17:03 ` [PATCH v2 3/5] kunit: string-stream-test: Make it a separate module Ivan Orlov
2024-06-19 18:09   ` Jeff Johnson
2024-06-27 20:49     ` Ivan Orlov
2024-06-21 21:07   ` Rae Moar
2024-06-27 20:51     ` Ivan Orlov
2024-06-18 17:03 ` [PATCH v2 4/5] kunit: assert_test: Prepare to be merged into kunit-test.c Ivan Orlov
2024-06-21 21:19   ` Rae Moar
2024-06-18 17:03 ` [PATCH v2 5/5] kunit: Merge assertion test " Ivan Orlov
2024-06-21 21:38   ` Rae Moar
2024-06-27 20:46     ` Ivan Orlov

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