mbox series

[0/2] KUnit-Kmemleak Integration

Message ID 20200706211309.3314644-1-urielguajardojr@gmail.com (mailing list archive)
Headers show
Series KUnit-Kmemleak Integration | expand

Message

Uriel Guajardo July 6, 2020, 9:13 p.m. UTC
From: Uriel Guajardo <urielguajardo@google.com>

With these patches, KUnit can access and manually run kmemleak in every test
case. Any errors caught by kmemleak will cause the KUnit test to fail.

This patchset relies on "kunit: KASAN integration", which places the
currently running kunit test in task_struct. [1]

[1] https://lore.kernel.org/linux-kselftest/20200606040349.246780-2-davidgow@google.com

Uriel Guajardo (2):
  kunit: support kunit failures from debugging tools
  kunit: kmemleak integration

 include/kunit/test-bug.h | 15 +++++++++++++
 include/kunit/test.h     |  1 +
 include/linux/kmemleak.h | 11 ++++++++++
 lib/Kconfig.debug        | 26 +++++++++++++++++++++++
 lib/kunit/test.c         | 46 +++++++++++++++++++++++++++++++++++-----
 mm/kmemleak.c            | 27 +++++++++++++++++------
 6 files changed, 115 insertions(+), 11 deletions(-)
 create mode 100644 include/kunit/test-bug.h