[Linux-kernel-mentees] Potential new task: a new self-test in get-maintainers.pl

Joe Perches joe at perches.com
Thu Nov 19 08:10:44 UTC 2020


On Thu, 2020-11-19 at 08:38 +0100, Lukas Bulwahn wrote:
> Hi Aditya, Hi Dwaipayan,
> 
> here another potential task for some perl work:
> 
> Implement a new self-test in get-maintainers.pl that checks if a file
> entry line is already covered by the others provided, i.e., all files
> matching to one file entry line is already matched by all the other
> file entry lines of the same section.
> 
> Here is a quick example where I did something wrong of that kind:
> https://lore.kernel.org/netfilter-devel/20201109091942.32280-1-lukas.bulwahn@gmail.com/
> 
> This needs a bit of reading and understanding the MAINTAINERS file and
> what get_maintainers.pl does with those entries. get-maintainers.pl
> already implements some self-test checks and you can add this check
> above to the existing ones.

I think that's a pretty trivial defect.  Overlaps aren't fatal.

Renames and moves are pretty common though and the maintainers
F: and X: patterns aren't always correct/current.

Perhaps more useful would be a new script that tracks all the various
commit file moves/renames and maps those to the MAINTAINERS sections
so that the moved/renamed file patterns in MAINTAINERS are updated.

That's rather out-of-scope for both get_maintainer.pl and checkpatch.pl

A trivial script I wrote and used a couple years ago is attached.

https://lore.kernel.org/lkml/da894e81adc28ac98d9c399d24d8eb075b30fd1a.camel@perches.com/

Done using -next with an empty patterns directory

$ perl ./scripts/get_maintainer.pl --self-test=patterns | \
  cut -f2 -d: | \
  while read line ; do \
    perl ./dump_section.perl $line \
  done


-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump_section.pl
Type: application/x-perl
Size: 3558 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20201119/d48cdc87/attachment.pl>


More information about the Linux-kernel-mentees mailing list