[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <700f0ed4-fe09-7610-b460-89b5ad08452c@linuxfoundation.org>
Date: Tue, 6 Oct 2020 09:21:01 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Kees Cook <keescook@...omium.org>
Cc: corbet@....net, gregkh@...uxfoundation.org, shuah@...nel.org,
rafael@...nel.org, johannes@...solutions.net, lenb@...nel.org,
james.morse@....com, tony.luck@...el.com, bp@...en8.de,
arve@...roid.com, tkjos@...roid.com, maco@...roid.com,
joel@...lfernandes.org, christian@...uner.io, hridya@...gle.com,
surenb@...gle.com, minyard@....org, arnd@...db.de,
mchehab@...nel.org, rric@...nel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-acpi@...r.kernel.org, devel@...verdev.osuosl.org,
openipmi-developer@...ts.sourceforge.net,
linux-edac@...r.kernel.org, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters
On 9/28/20 5:13 PM, Kees Cook wrote:
> On Mon, Sep 28, 2020 at 04:41:47PM -0600, Shuah Khan wrote:
>> On 9/26/20 10:29 AM, Kees Cook wrote:
>>> On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote:
>>>> 7. Verified that the test module compiles in kunit env. and test
>>>> module can be loaded to run the test.
>>>
>>> I meant write it using KUnit interfaces (e.g. KUNIT_EXPECT*(),
>>> kunit_test_suite(), etc):
>>> https://www.kernel.org/doc/html/latest/dev-tools/kunit/
>>>
>>> Though I see the docs are still not updated[1] to reflect the Kconfig
>>> (CONFIG_foo_KUNIT_TEST) and file naming conventions (foo_kunit.c).
>>>
>>
>> I would like to be able to run this test outside Kunit env., hence the
>> choice to go with a module and kselftest script. It makes it easier to
>> test as part of my workflow as opposed to doing a kunit and build and
>> running it that way.
>
> It does -- you just load it normally like before and it prints out
> everything just fine. This is how I use the lib/test_user_copy.c and
> lib/test_overflow.c before/after their conversions.
>
I am not seeing any kunit links to either of these tests. I find the
lib/test_overflow.c very hard to read.
I am going to stick with what I have for now and handle conversion
later.
I think it might be a good idea to add tests for atomic_t and refcount_t
APIS as well at some point.
thanks,
-- Shuah
Powered by blists - more mailing lists