lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c2a5c8e-e48a-40f1-bc84-01669a5b8741@linuxfoundation.org>
Date: Tue, 30 Jul 2024 09:49:01 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Yury Norov
 <yury.norov@...il.com>, Rasmus Villemoes <linux@...musvillemoes.dk>,
 Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, kees@...nel.org,
 David Gow <davidgow@...gle.com>, John Hubbard <jhubbard@...dia.com>,
 Shuah Khan <skhan@...uxfoundation.org>
Cc: kernel@...labora.com, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

On 7/29/24 02:29, Muhammad Usama Anjum wrote:
> On 7/27/24 12:26 AM, 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.
> Let's discuss this on discussion thread [1].

So - it doesn't mean that it is a done deal. Each patch will be
reviewed on individual basis. This test in particular clearly its
use-case right in the config which was deleted without understanding
it.

-config TEST_BITMAP
-	tristate "Test bitmap_*() family of functions at runtime"
-	help
-	  Enable this option to test the bitmap functions at boot.


This line above is the important piece of information which tells
you how the test is intended to be used.

1. You can enable this option and boot the kernel to check for regressions.
2. You can load the module on a running kernel to check for health.

Converting it to kunit drops support for these two use-cases which
are user-space regressions. You don't want to do that.
  
-
-	  If unsure, say N.
-
  config TEST_UUID
  	tristate "Test functions located in the uuid module at runtime"
  
@@ -2813,6 +2806,14 @@ config USERCOPY_KUNIT_TEST
  	  on the copy_to/from_user infrastructure, making sure basic
  	  user/kernel boundary testing is working.
  
+config BITMAP_KUNIT_TEST
+	tristate "KUnit Test for bitmap_*() family of functions"
+	depends on KUNIT
+	default KUNIT_ALL_TESTS
+	help
+	  This builds the "bitmap_kunit" module that runs tests for
+	  bitmaps int the kernel making sure that there isn't any bug.

And this isn't complete even. I don'ty see tristate in here.

I responded to the thread that started this flurry of conversion activity
stating that converting tests without thinking through the use-cases
isn't what we want to do.

Reports aren't everything. The primary reason we have these tests is for
developers to be able to test. Reports can be improved and shouldn't
come at the expense of coverage and testing. Any patch that does that
will be NACKed.

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ