Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

From: Yury Norov
Date: Sat Jul 27 2024 - 14:10:39 EST


On Fri, Jul 26, 2024 at 01:26:48PM -0600, Shuah Khan wrote:
> On 7/26/24 05:06, Muhammad Usama Anjum wrote:
> > In this series, test_bitmap is being converted to kunit test. Multiple
> > patches will make the review process smooth.
> >
> > - Patch-1: Convert the tests in lib/test_bitmap.c to kunit
> > - Patch-2: Rename the lib/test_bitmap.c to lib/bitmap_kunit.c and other
> > configuration options
> > - Patch-3: Remove the bitmap.sh selftest
> >
> > Muhammad Usama Anjum (3):
> > bitmap: convert test_bitmap to KUnit test
> > bitmap: Rename module
> > selftests: lib: remove test_bitmap
> >
> > MAINTAINERS | 2 +-
> > lib/Kconfig.debug | 15 +-
> > lib/Makefile | 2 +-
> > lib/{test_bitmap.c => bitmap_kunit.c} | 624 ++++++++++++--------------
> > tools/testing/selftests/lib/Makefile | 2 +-
> > tools/testing/selftests/lib/bitmap.sh | 3 -
> > tools/testing/selftests/lib/config | 1 -
> > 7 files changed, 295 insertions(+), 354 deletions(-)
> > rename lib/{test_bitmap.c => bitmap_kunit.c} (70%)
> > delete mode 100755 tools/testing/selftests/lib/bitmap.sh
> >
>
> Can you tell me how this conversion helps?
>
> It is removing the ability to run bitmap tests during boot.
> It doesn't make sense to blindly convert all test under lib
> to kunit - Nack on this change or any change that takes away
> the ability to run tests and makes them dependent on kunit.

Hi Muhammad,

In addition to Shuah's and John's reasoning. This patch wipes the
test history (git blame will point on you for most of the test),
breaks boot-time testing support, messes with config names and
usability, and drops kselftest support for ... exactly, what?

KUNIT engine here doesn't improve on readability, neither shorten
the test length, to my taste.

If you'd like to contribute to bitmaps testing - I'm all for that.
This is the very core and performance-sensitive piece of kernel,
and any extra-coverage is always welcome.

But I think the best way would be either adding new cases to the
existing test, or writing a new test, KUNIT-based, if you like.

Thanks,
Yury