linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs/kselftest: clarify running mainline tests on stables
@ 2022-01-26 20:13 Shuah Khan
  2022-01-31 19:37 ` Reinette Chatre
  0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2022-01-26 20:13 UTC (permalink / raw)
  To: shuah, corbet; +Cc: Shuah Khan, linux-kselftest, linux-doc, linux-kernel

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:
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] docs/kselftest: clarify running mainline tests on stables
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Reinette Chatre @ 2022-01-31 19:37 UTC (permalink / raw)
  To: Shuah Khan, shuah, corbet; +Cc: linux-kselftest, linux-doc, linux-kernel

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?

Thank you very much

Reinette

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] docs/kselftest: clarify running mainline tests on stables
  2022-01-31 19:37 ` Reinette Chatre
@ 2022-01-31 20:34   ` Shuah Khan
  2022-01-31 21:20     ` Reinette Chatre
  0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2022-01-31 20:34 UTC (permalink / raw)
  To: Reinette Chatre, shuah, corbet
  Cc: linux-kselftest, linux-doc, linux-kernel, Shuah Khan

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] docs/kselftest: clarify running mainline tests on stables
  2022-01-31 20:34   ` Shuah Khan
@ 2022-01-31 21:20     ` Reinette Chatre
  2022-01-31 21:52       ` Shuah Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Reinette Chatre @ 2022-01-31 21:20 UTC (permalink / raw)
  To: Shuah Khan, shuah, corbet; +Cc: linux-kselftest, linux-doc, linux-kernel

Hi Shuah,

On 1/31/2022 12:34 PM, Shuah Khan wrote:
> On 1/31/22 12:37 PM, Reinette Chatre wrote:
>> 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.

This is helpful, thank you very much. In summary I understand this to mean that
when testing a stable kernel it is recommended to run tests from mainline, but
running the tests from the same stable kernel version as the kernel being tested
is also a supported use case and thus fixes to tests should be back-ported. 

Thank you

Reinette




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] docs/kselftest: clarify running mainline tests on stables
  2022-01-31 21:20     ` Reinette Chatre
@ 2022-01-31 21:52       ` Shuah Khan
  0 siblings, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2022-01-31 21:52 UTC (permalink / raw)
  To: Reinette Chatre, shuah, corbet
  Cc: linux-kselftest, linux-doc, linux-kernel, Shuah Khan

Hi Reinette,

On 1/31/22 2:20 PM, Reinette Chatre wrote:
> Hi Shuah,
> 
> On 1/31/2022 12:34 PM, Shuah Khan wrote:
>> On 1/31/22 12:37 PM, Reinette Chatre wrote:
>>> 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.
> 
> This is helpful, thank you very much. In summary I understand this to mean that
> when testing a stable kernel it is recommended to run tests from mainline, but
> running the tests from the same stable kernel version as the kernel being tested
> is also a supported use case and thus fixes to tests should be back-ported.
>

Correct. Right. In the slide set you referenced, I included a slide that shows
the combination and one of them is indeed rev matching kselftest and kernel.

Some tests such as bpf require rev match with the kernel i.e running kselftest from
the same release.

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-31 21:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-01-31 21:20     ` Reinette Chatre
2022-01-31 21:52       ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).