Skip to content

binder: Set up KUnit tests for alloc

Tiffany Yang linux-kselftest lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 7 repliesIn review
  2. v36 patches 18 repliesSuperseded
  3. v25 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches1 replySuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6binder: Fix selftest page indexingdrivers/android/binder_alloc_selftest.c+1 -11 reply
2/6binder: Store lru freelist in binder_allocdrivers/android/binder_alloc.c drivers/android/binder_alloc.h drivers/android/binder_alloc_selftest.c+67 -201 reply
3/6kunit: test: Export kunit_attach_mm()include/kunit/test.h lib/kunit/user_alloc.c+14 -20 replies
4/6binder: Scaffolding for binder_alloc KUnit testsdrivers/android/Kconfig drivers/android/Makefile drivers/android/binder.c +6 more+218 -60 replies
5/6binder: Convert binder_alloc selftests to KUnitdrivers/android/Kconfig drivers/android/Makefile drivers/android/binder.c +4 more+282 -3661 reply
6/6binder: encapsulate individual alloc test casesdrivers/android/tests/binder_alloc_kunit.c+175 -512 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchCarlos LlamasKees CookRae MoarJoel Fernandes
SeriesR-b
1/6A-b R-b
2/6A-b R-b
3/6R-b R-b
4/6A-b R-b T-b
5/6A-b R-b
6/6A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/6] binder: Set up KUnit tests for alloc

Hello,

binder_alloc_selftest provides a robust set of checks for the binder allocator, but it rarely runs because it must hook into a running binder process and block all other binder threads until it completes. The test itself is a good candidate for conversion to KUnit, and it can be further isolated from user processes by using a test-specific lru freelist instead of the global one. This series converts the selftest to KUnit to make it less burdensome to run and to set up a foundation for unit testing future binder_alloc changes.

Thanks,
Tiffany

Tiffany Yang (6):
binder: Fix selftest page indexing
binder: Store lru freelist in binder_alloc
kunit: test: Export kunit_attach_mm()
binder: Scaffolding for binder_alloc KUnit tests
binder: Convert binder_alloc selftests to KUnit
binder: encapsulate individual alloc test cases

 drivers/android/Kconfig                    |  15 +-
 drivers/android/Makefile                   |   2 +-
 drivers/android/binder.c                   |  10 +-
 drivers/android/binder_alloc.c             |  39 +-
 drivers/android/binder_alloc.h             |  14 +-
 drivers/android/binder_alloc_selftest.c    | 306 -----------
 drivers/android/binder_internal.h          |   4 +
 drivers/android/tests/.kunitconfig         |   7 +
 drivers/android/tests/Makefile             |   6 +
 drivers/android/tests/binder_alloc_kunit.c | 572 +++++++++++++++++++++
 include/kunit/test.h                       |  12 +
 lib/kunit/user_alloc.c                     |   4 +-
 12 files changed, 651 insertions(+), 340 deletions(-)
 delete mode 100644 drivers/android/binder_alloc_selftest.c
 create mode 100644 drivers/android/tests/.kunitconfig
 create mode 100644 drivers/android/tests/Makefile
 create mode 100644 drivers/android/tests/binder_alloc_kunit.c
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog