All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 linux-kselftest-test 0/6]  kunit: support building core/tests as modules
@ 2019-10-17 18:07 Alan Maguire
  2019-10-17 18:07 ` [PATCH v3 linux-kselftest-test 1/6] kunit: move string-stream.h to lib/kunit/string-stream-impl.h Alan Maguire
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Alan Maguire @ 2019-10-17 18:07 UTC (permalink / raw)
  To: brendanhiggins, linux-kselftest
  Cc: linux-kernel, kunit-dev, keescook, yzaikin, akpm, yamada.masahiro,
	catalin.marinas, joe.lawrence, penguin-kernel, schowdary, urezki,
	andriy.shevchenko, corbet, linux-doc, Alan Maguire

The current kunit execution model is to provide base kunit functionality
and tests built-in to the kernel.  The aim of this series is to allow
building kunit itself and tests as modules.  This in turn allows a
simple form of selective execution; load the module you wish to test.
In doing so, kunit itself (if also built as a module) will be loaded as
an implicit dependency.

Because this requires a core API modification - if a module delivers
multiple suites, they must be declared with the kunit_test_suites()
macro - we're proposing this patch set as a candidate to be applied to the
test tree before too many kunit consumers appear.  We attempt to deal
with existing consumers in patch 4.

Changes since v2:
 - moved string-stream.h header to lib/kunit/string-stream-impl.h (Brendan)
   (patch 1)
 - split out non-exported interfaces in try-catch-impl.h (Brendan)
   (patch 2)
 - added kunit_find_symbol() and KUNIT_INIT_*SYMBOL to lookup non-exported
   symbols. KUNIT_INIT_*SYMBOL() is defined so that a mismatch between
   local symbol definition and definition of symbol in target will trigger
   a compilation error when the object is compiled built-in (Brendan)
   (patches 3, 4)
 - removed #ifdef MODULE around module licenses (Randy, Brendan, Andy)
   (patch 4)
 - replaced kunit_test_suite() with kunit_test_suites() rather than
   supporting both (Brendan) (patch 4)
 - lookup sysctl_hung_task_timeout_secs as kunit may be built as a module
   and the symbol may not be available (patch 5)
 - fixed whitespace issues in doc (patch 6)

Alan Maguire (6):
  kunit: move string-stream.h to lib/kunit/string-stream-impl.h
  kunit: hide unexported try-catch interface in try-catch-impl.h
  kunit: add kunit_find_symbol() function for symbol lookup
  kunit: allow kunit tests to be loaded as a module
  kunit: allow kunit to be loaded as a module
  kunit: update documentation to describe module-based build

 Documentation/dev-tools/kunit/faq.rst   |   3 +-
 Documentation/dev-tools/kunit/index.rst |   3 +
 Documentation/dev-tools/kunit/usage.rst |  16 +++++
 include/kunit/assert.h                  |   3 +-
 include/kunit/string-stream.h           |  51 -------------
 include/kunit/test.h                    | 123 +++++++++++++++++++++++++++++---
 include/kunit/try-catch.h               |  10 ---
 kernel/sysctl-test.c                    |   4 +-
 lib/Kconfig.debug                       |   2 +-
 lib/kunit/Kconfig                       |   6 +-
 lib/kunit/Makefile                      |   4 +-
 lib/kunit/assert.c                      |   9 +++
 lib/kunit/example-test.c                |   4 +-
 lib/kunit/string-stream-impl.h          |  51 +++++++++++++
 lib/kunit/string-stream-test.c          |  46 ++++++++----
 lib/kunit/string-stream.c               |   3 +-
 lib/kunit/test-test.c                   |  50 ++++++++++---
 lib/kunit/test.c                        |  49 +++++++++++++
 lib/kunit/try-catch-impl.h              |  23 ++++++
 lib/kunit/try-catch.c                   |   6 ++
 20 files changed, 363 insertions(+), 103 deletions(-)
 delete mode 100644 include/kunit/string-stream.h
 create mode 100644 lib/kunit/string-stream-impl.h
 create mode 100644 lib/kunit/try-catch-impl.h

-- 
1.8.3.1


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

end of thread, other threads:[~2019-11-14 21:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-17 18:07 [PATCH v3 linux-kselftest-test 0/6] kunit: support building core/tests as modules Alan Maguire
2019-10-17 18:07 ` [PATCH v3 linux-kselftest-test 1/6] kunit: move string-stream.h to lib/kunit/string-stream-impl.h Alan Maguire
2019-11-08  1:01   ` Brendan Higgins
2019-10-17 18:07 ` [PATCH v3 linux-kselftest-test 2/6] kunit: hide unexported try-catch interface in try-catch-impl.h Alan Maguire
2019-11-08  1:07   ` Brendan Higgins
2019-10-17 18:07 ` [PATCH v3 linux-kselftest-test 3/6] kunit: add kunit_find_symbol() function for symbol lookup Alan Maguire
2019-11-08  1:24   ` Brendan Higgins
2019-10-17 18:07 ` [PATCH v3 linux-kselftest-test 4/6] kunit: allow kunit tests to be loaded as a module Alan Maguire
2019-11-08  1:40   ` Brendan Higgins
2019-10-17 18:07 ` [PATCH v3 linux-kselftest-test 5/6] kunit: allow kunit " Alan Maguire
2019-11-08  2:43   ` Brendan Higgins
2019-11-08  3:02     ` Brendan Higgins
2019-11-08 15:30     ` Alan Maguire
2019-11-11 21:41       ` Brendan Higgins
     [not found]         ` <20191114063815.9403820706@mail.kernel.org>
     [not found]           ` <alpine.LRH.2.20.1911140750450.8907@dhcp-10-175-202-216.vpn.oracle.com>
2019-11-14 21:31             ` Brendan Higgins
2019-11-14 21:33               ` Brendan Higgins
2019-10-17 18:07 ` [PATCH v3 linux-kselftest-test 6/6] kunit: update documentation to describe module-based build Alan Maguire

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.