From: Joe Perches <joe@perches.com>
To: Matteo Croce <technoboy85@gmail.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <davidgow@google.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] get_maintainer: add KUnit maintainers for KUnit test files
Date: Sun, 01 Mar 2026 18:05:38 -0800 [thread overview]
Message-ID: <e8dee2d6856b6ab4752c93f571a9ba582da070ac.camel@perches.com> (raw)
In-Reply-To: <CAFnufp3ufMfv8BYLNSqJWoybRMcw5FeuFThp-mRBTU9sYUb=WQ@mail.gmail.com>
On Mon, 2026-03-02 at 01:50 +0100, Matteo Croce wrote:
> ```
> Il giorno dom 1 mar 2026 alle ore 17:42 Joe Perches <[joe@perches.com](mailto:joe@perches.com)>
> ha scritto:
>
> > On Sun, 2026-03-01 at 12:17 +0100, Matteo Croce wrote:
> BTW at this point it would be useful to implement the ** glob operator,
> > > but maybe it's not worth it.
>
> >
> > Hi Matteo.
> >
> > Given you've now touched get_maintainer, you are welcome to do it.
> > Maybe change "sub file_match_pattern {".
> > But I believe this is the first actual use case so I will not.
>
>
> Mmm not really the first usage, I see this pattern being already used:
>
> $ grep -F '/*/*/' MAINTAINERS
> F: Documentation/devicetree/bindings/*/*/*ma35*
> F: drivers/*/*/*ma35*
> F: Documentation/devicetree/bindings/*/*/*npcm*
> F: drivers/*/*/*npcm*
> F: arch/*/*/*/*ftrace*
> F: arch/*/*/*ftrace*
> F: drivers/net/ethernet/*/*/*/*/*xdp*
> F: drivers/net/ethernet/*/*/*xdp*
Nope.
Those are specific directory depth matches.
Your use case is _all_ directory depth matches.
> I tried to implement it and seems easier than expected, the chunk below does it
> (validated with: scripts/get_maintainer.pl --self-test=patterns)
>
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
This doesn't apply as there are tab/space problems.
> @@ -375,7 +375,9 @@ sub read_maintainer_file {
[]
> @@ -1045,12 +1050,8 @@ sub file_match_pattern {
> return 1;
> }
> } else {
> - if ($file =~ m@^$pattern@) {
> - my $s1 = ($file =~ tr@/@@);
> - my $s2 = ($pattern =~ tr@/@@);
> - if ($s1 == $s2) {
> - return 1;
> - }
> + if ($file =~ m@^$pattern$@) {
> + return 1;
and I think the count of / characters matters
but if you send a patch that applies, I'll verify.
cheers,
> }
> }
> return 0;
>
> Regards,
>
> ```
next prev parent reply other threads:[~2026-03-02 2:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-01 1:11 Matteo Croce
2026-03-01 2:36 ` Joe Perches
2026-03-01 11:17 ` Matteo Croce
2026-03-01 11:34 ` Thomas Weißschuh
2026-03-01 16:42 ` Joe Perches
2026-03-02 0:50 ` Matteo Croce
2026-03-02 2:05 ` Joe Perches [this message]
2026-03-02 2:34 ` Matteo Croce
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=e8dee2d6856b6ab4752c93f571a9ba582da070ac.camel@perches.com \
--to=joe@perches.com \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=technoboy85@gmail.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
all inboxes | Powered by JetHome®