From: Shuah Khan <skhan@linuxfoundation.org>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>,
Shuah Khan <shuah@kernel.org>, Jonathan Corbet <corbet@lwn.net>
Cc: kernel@collabora.com, bagasdotme@gmail.com,
linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v2] docs/kselftest: add more guidelines for adding new tests
Date: Tue, 7 Jun 2022 15:41:48 -0600 [thread overview]
Message-ID: <63fc263d-c06a-2974-298c-5da80322411a@linuxfoundation.org> (raw)
In-Reply-To: <e01f90a0-a3c7-c5fd-ae1f-197c6fec525e@collabora.com>
On 6/7/22 6:59 AM, Muhammad Usama Anjum wrote:
> Reminder!
>
Remember to avoid top posting.
> On 5/21/22 12:36 PM, Muhammad Usama Anjum wrote:
>> Improve and add instructions to add new tests. Add build commands to
>> test before sending the new test patch.
>>
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>> ---
>> Changes in v2:
>> - Updated commit message
>> - Removed dependence of this patch from other patch
>> - Updated instructions
>> ---
>> Documentation/dev-tools/kselftest.rst | 27 ++++++++++++++++++++++++++-
>> 1 file changed, 26 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
>> index a833ecf12fbc1..ee6467ca8293f 100644
>> --- a/Documentation/dev-tools/kselftest.rst
>> +++ b/Documentation/dev-tools/kselftest.rst
>> @@ -208,6 +208,14 @@ In general, the rules for selftests are
>> Contributing new tests (details)
>> ================================
>>
>> + * In your Makefile, use facilities from lib.mk by including it instead of
>> + reinventing the wheel. Specify flags and binaries generation flags on
>> + need basis before including lib.mk. ::
>> +
>> + CFLAGS = $(KHDR_INCLUDES)
>> + TEST_GEN_PROGS := close_range_test
>> + include ../lib.mk
>> +
>> * Use TEST_GEN_XXX if such binaries or files are generated during
>> compiling.
>>
>> @@ -230,13 +238,30 @@ Contributing new tests (details)
>> * First use the headers inside the kernel source and/or git repo, and then the
>> system headers. Headers for the kernel release as opposed to headers
>> installed by the distro on the system should be the primary focus to be able
>> - to find regressions.
>> + to find regressions. Use KHDR_INCLUDES in Makefile to include headers from
>> + the kernel source.
>>
>> * If a test needs specific kernel config options enabled, add a config file in
>> the test directory to enable them.
>>
>> e.g: tools/testing/selftests/android/config
>>
>> + * Create a .gitignore file inside test directory and add all generated objects
>> + in it.
>> +
>> + * Add new test name in TARGETS in selftests/Makefile::
>> +
>> + TARGETS += android
>> +
>> + * All changes should pass::
>> +
>> + kselftest-{all,install,clean,gen_tar}
>> + kselftest-{all,install,clean,gen_tar} O=abo_path
>> + kselftest-{all,install,clean,gen_tar} O=rel_path
>> + make -C tools/testing/selftests {all,install,clean,gen_tar}
>> + make -C tools/testing/selftests {all,install,clean,gen_tar} O=abs_path
>> + make -C tools/testing/selftests {all,install,clean,gen_tar} O=rel_path
>> +
>> Test Module
>> ===========
>>
>
The change looks good to me. I am catching up on patch backlog after the
merge window and vacation. I can take this through kselftest or if it
goes through doc tree - here is my
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
next prev parent reply other threads:[~2022-06-08 1:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-21 7:36 [PATCH v2] docs/kselftest: add more guidelines for adding new tests Muhammad Usama Anjum
2022-06-07 12:59 ` Muhammad Usama Anjum
2022-06-07 21:41 ` Shuah Khan [this message]
2022-06-21 14:33 ` Muhammad Usama Anjum
2022-06-24 19:49 ` Jonathan Corbet
2022-06-24 22:39 ` Shuah Khan
2022-06-25 4:32 ` Muhammad Usama Anjum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63fc263d-c06a-2974-298c-5da80322411a@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=kernel@collabora.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=usama.anjum@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox