public inbox for linux-kselftest@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Reinette Chatre <reinette.chatre@intel.com>,
	shuah@kernel.org, corbet@lwn.net
Cc: linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] docs/kselftest: clarify running mainline tests on stables
Date: Mon, 31 Jan 2022 13:34:19 -0700	[thread overview]
Message-ID: <bb1ba6f5-4cd8-742c-62b7-a62a6f4cef91@linuxfoundation.org> (raw)
In-Reply-To: <7ba5e99a-9169-75c4-2324-f9a3ce9a506e@intel.com>

Hi Reinette,

On 1/31/22 12:37 PM, Reinette Chatre wrote:
> Hi Shuah,
> 
> On 1/26/2022 12:13 PM, Shuah Khan wrote:
>> Update the document to clarifiy support for running mainline
>> kselftest on stable releases and the reasons for not removing
>> test code that can test older kernels.
>>
>> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
>> ---
>>   Documentation/dev-tools/kselftest.rst | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
>> index dcefee707ccd..a833ecf12fbc 100644
>> --- a/Documentation/dev-tools/kselftest.rst
>> +++ b/Documentation/dev-tools/kselftest.rst
>> @@ -7,6 +7,14 @@ directory. These are intended to be small tests to exercise individual code
>>   paths in the kernel. Tests are intended to be run after building, installing
>>   and booting a kernel.
>>   
>> +Kselftest from mainline can be run on older stable kernels. Running tests
>> +from mainline offers the best coverage. Several test rings run mainline
>> +kselftest suite on stable releases. The reason is that when a new test
>> +gets added to test existing code to regression test a bug, we should be
>> +able to run that test on an older kernel. Hence, it is important to keep
>> +code that can still test an older kernel and make sure it skips the test
>> +gracefully on newer releases.
>> +
>>   You can find additional information on Kselftest framework, how to
>>   write new tests using the framework on Kselftest wiki:
>>   
> 
> (My apologies if this is already documented, I was not able to find this guidance
> in Documentation/dev-tools/kselftest.rst nor when looking at the
> "Kselftest use-cases..." slides linked from https://kselftest.wiki.kernel.org/)
> 
> Could you please clarify what the requirement/expectation is regarding fixes
> to tests? Since the recommendation in the above change is that Kselftest from
> mainline should be run on older stable kernels, is it required to backport
> fixes to the tests themselves to stable kernels?
> 

Couple of things to consider.

- A new test gets added to regression test a bug in stable and mainline
- A new test gets added to test a kernel module/feature/API that has been
   supported by stable and mainline releases

In both of these cases, running mainline kselftest on stables gives you the
best coverage.

Kselftest fixes get pulled into stables like any other kernel fixes. If a few
fixes are missing, it is a good idea to back-port if they fall into above two
categories. If the test is for a new feature then, it doesn't make sense to
back-port.

Hope this is helpful.

thanks,
-- Shuah



  reply	other threads:[~2022-01-31 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 20:13 [PATCH] docs/kselftest: clarify running mainline tests on stables Shuah Khan
2022-01-31 19:37 ` Reinette Chatre
2022-01-31 20:34   ` Shuah Khan [this message]
2022-01-31 21:20     ` Reinette Chatre
2022-01-31 21:52       ` Shuah Khan

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=bb1ba6f5-4cd8-742c-62b7-a62a6f4cef91@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@kernel.org \
    /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