From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Cihan Karadag <cihan.cihan@gmail.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-kernel@vger.kernel.org, workflows@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH] checkpatch: warn about possible missing gitignore coverage in selftests
Date: Fri, 31 Jul 2026 11:09:17 -0700 [thread overview]
Message-ID: <fc83bfa2-8f29-4295-b8e6-47edcb6e354e@oss.qualcomm.com> (raw)
In-Reply-To: <6e7009f3-ed2f-4a84-868b-661b5ac7ab8f@kernel.org>
On 7/30/2026 11:26 PM, Krzysztof Kozlowski wrote:
> On 29/07/2026 10:01, Cihan Karadag wrote:
>> On Tue, Jul 28, 2026 at 8:31 AM Jakub Kicinski <kuba@kernel.org> wrote:
>>>
>>> On Mon, 27 Jul 2026 23:24:41 -0600 Cihan Karadag wrote:
>>>> Per selftests documentation [1], every generated test binary must be
>>>> added to gitignore to prevent leaving untracked files in the kernel
>>>> tree.
>>>>
>>>> This is an easy mistake to make when adding a new test. In fact, a
>>>> search of selftests history turns up dozens of standalone follow-up
>>>> patches with titles like "add missing gitignore for <binary>", each
>>>> needed only because the original patch adding a new test
>>>> didn't also update gitignore.
>>>>
>>>> Add a SELFTESTS_GITIGNORE check that warns about gitignore coverage
>>>> whenever a patch adds a new file under tools/testing/selftests/, the
>>>> same way FILE_PATH_CHANGES warns about MAINTAINERS on any added,
>>>> moved, or deleted file.
>>>
>>> What percentage of changes to selftests from last 2 releases will
>>> false-positive trigger this? Would be good to know, checkpatch has
>>> a tendency of generating false positives which is quite counter
>>> productive.
>>
>> It will trigger whenever a new file is added to selftests, which has
>> a chance of introducing a test artifact into the tree. I checked the
>> last 20 commits touching selftests and only 6 of them were new file
>> additions, so this warning would have fired 6 times. Actually, one of
>> those 6 had a missing gitignore entry that this check is supposed to
>> warn about (fuse_acl_cache_test, 9acb102522b9).
>>
>> Comparing to other WARNINGs that checkpatch generates, such as
>> FILE_PATH_CHANGES which has existed since 2014, this seems like a
>> reasonable and already accepted way for checkpatch to operate.
>>
>> For comparison, I checked the last 20 commits that triggered
>> FILE_PATH_CHANGES in the tree, and none of them actually needed a
>> MAINTAINERS update.
>
> FILE_PATH_CHANGES causes many false-positives, honestly for my work of
> getting 100-200 commits per release it was screaming like 20% of time
> and never had it right. All of its reports are false positives to me.
>
> And I saw many times people do weird commits and weird MAINTAINERS
> updates, just because checkpatch asked them.
>
> So your argument of "reasonable and already accepted way for checkpatch
> to operate" is simply wrong. Don't add more poor tests jut because we
> have one which is IMO terrible.
Concur.
In my tooling I always set:
--ignore COMMIT_LOG_LONG_LINE,FILE_PATH_CHANGES
/jeff
prev parent reply other threads:[~2026-07-31 18:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 5:24 [PATCH] checkpatch: warn about possible missing gitignore coverage in selftests Cihan Karadag
2026-07-28 14:31 ` Jakub Kicinski
2026-07-29 8:01 ` Cihan Karadag
2026-07-30 14:52 ` Jakub Kicinski
2026-07-31 6:26 ` Krzysztof Kozlowski
2026-07-31 18:09 ` Jeff Johnson [this message]
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=fc83bfa2-8f29-4295-b8e6-47edcb6e354e@oss.qualcomm.com \
--to=jeff.johnson@oss.qualcomm.com \
--cc=apw@canonical.com \
--cc=cihan.cihan@gmail.com \
--cc=corbet@lwn.net \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=workflows@vger.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