linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] KUnit-KASAN Integration
@ 2020-04-02 20:46 Patricia Alfonso
  2020-04-02 20:46 ` [PATCH v4 2/4] KUnit: KASAN Integration Patricia Alfonso
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Patricia Alfonso @ 2020-04-02 20:46 UTC (permalink / raw)
  To: davidgow, brendanhiggins, aryabinin, dvyukov, mingo, peterz,
	juri.lelli, vincent.guittot
  Cc: linux-kernel, kasan-dev, kunit-dev, linux-kselftest, Patricia Alfonso

This patchset contains everything needed to integrate KASAN and KUnit.

KUnit will be able to:
(1) Fail tests when an unexpected KASAN error occurs
(2) Pass tests when an expected KASAN error occurs

Convert KASAN tests to KUnit with the exception of copy_user_test
because KUnit is unable to test those.

Add documentation on how to run the KASAN tests with KUnit and what to
expect when running these tests.

Depends on "[PATCH v3 kunit-next 0/2] kunit: extend kunit resources
API" patchset [1]

[1] https://lore.kernel.org/linux-kselftest/1585313122-26441-1-git-send-email-alan.maguire@oracle.com/T/#t

Changes from v3:
 - KUNIT_SET_KASAN_DATA and KUNIT_DO_EXPECT_KASAN_FAIL have been
 combined and included in KUNIT_DO_EXPECT_KASAN_FAIL() instead.
 - Reordered logic in kasan_update_kunit_status() in report.c to be
 easier to read.
 - Added comment to not use the name "kasan_data" for any kunit tests
 outside of KUNIT_EXPECT_KASAN_FAIL().

Patricia Alfonso (4):
  Add KUnit Struct to Current Task
  KUnit: KASAN Integration
  KASAN: Port KASAN Tests to KUnit
  KASAN: Testing Documentation

 Documentation/dev-tools/kasan.rst |  70 +++
 include/kunit/test.h              |   5 +
 include/linux/kasan.h             |   6 +
 include/linux/sched.h             |   4 +
 lib/Kconfig.kasan                 |  15 +-
 lib/Makefile                      |   3 +-
 lib/kunit/test.c                  |  13 +-
 lib/test_kasan.c                  | 680 +++++++++++++-----------------
 lib/test_kasan_module.c           |  76 ++++
 mm/kasan/report.c                 |  30 ++
 10 files changed, 511 insertions(+), 391 deletions(-)
 create mode 100644 lib/test_kasan_module.c

-- 
2.26.0.292.g33ef6b2f38-goog


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

end of thread, other threads:[~2020-04-06 17:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 20:46 [PATCH v4 0/4] KUnit-KASAN Integration Patricia Alfonso
2020-04-02 20:46 ` [PATCH v4 2/4] KUnit: KASAN Integration Patricia Alfonso
2020-04-03 13:19   ` Andrey Konovalov
2020-04-03 17:17     ` Patricia Alfonso
2020-04-06 17:44       ` Andrey Konovalov
2020-04-03 14:35   ` Alan Maguire
2020-04-02 20:46 ` [PATCH v4 4/4] KASAN: Testing Documentation Patricia Alfonso
2020-04-02 20:46 ` [PATCH v4 1/4] Add KUnit Struct to Current Task Patricia Alfonso
2020-04-03 17:11   ` Brendan Higgins
2020-04-02 20:46 ` [PATCH v4 3/4] KASAN: Port KASAN Tests to KUnit Patricia Alfonso
2020-04-03 13:39   ` Andrey Konovalov

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