[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba1afa07-ea24-4ae5-8f65-fc2fc24f1a22@kernel.org>
Date: Thu, 6 Mar 2025 19:22:49 +0100
From: Matthieu Baerts <matttbe@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
andrew+netdev@...n.ch, horms@...nel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next] docs: netdev: add a note on selftest posting
Hi Jakub,
On 06/03/2025 19:05, Jakub Kicinski wrote:
> We haven't had much discussion on the list about this, but
> a handful of people have been confused about rules on
> posting selftests for fixes, lately. I tend to post fixes
> with their respective selftests in the same series.
> There are tradeoffs around size of the net tree and conflicts
> but so far it hasn't been a major issue.
Good idea to clarify this point!
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> Documentation/process/maintainer-netdev.rst | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/process/maintainer-netdev.rst b/Documentation/process/maintainer-netdev.rst
> index e497729525d5..1ac62dc3a66f 100644
> --- a/Documentation/process/maintainer-netdev.rst
> +++ b/Documentation/process/maintainer-netdev.rst
> @@ -311,6 +311,14 @@ user space patches should form separate series (threads) when posted
> Posting as one thread is discouraged because it confuses patchwork
> (as of patchwork 2.2.2).
>
> +Co-posting selftests
> +--------------------
> +
> +Selftests should be part of the same series as the code changes.
> +Specifically for fixes both code change and related test should go into
> +the same tree (the tests may lack a Fixes tag, which is expected).
Regarding the Fixes tag in the tests, could we eventually suggest using
the same one as for the code change?
Sometimes, I do that to get the corresponding test backported as well,
if there are no conflicts. That's good to have an easy way to check if
something has been correctly fixed on stable versions as well.
The only thing is with the selftests written in Python or Bash: it is
easy to get a situation where there are no conflicts, but the
modification doesn't work, e.g. some functions or variables are not
available, etc. The stable team will then not notice that during their
build tests. Not sure if my suggestion is safe to recommend then.
Anyway, good to recommend attaching tests in the net tree!
> +Mixing code changes and test changes in a single commit is discouraged.
> +
> Preparing changes
> -----------------
>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
Powered by blists - more mailing lists