[PATCH v3 0/2] selftests/mm: use pattern matching in .gitignore

pratmal@google.com posted 2 patches 1 month ago
tools/testing/selftests/mm/.gitignore      | 71 +++-------------------
tools/testing/selftests/mm/Makefile        |  6 +-
tools/testing/selftests/mm/check_config.sh |  2 +-
tools/testing/selftests/mm/cow.c           |  2 +-
tools/testing/selftests/mm/gup_longterm.c  |  2 +-
5 files changed, 15 insertions(+), 68 deletions(-)
[PATCH v3 0/2] selftests/mm: use pattern matching in .gitignore
Posted by pratmal@google.com 1 month ago
From: Pratyush Mallick <pratmal@google.com>

The current selftests/mm/.gitignore hardcodes each generated test binary
by name, which requires manual updates every time a new test is added.

This series switches to a pattern-matching approach (similar to KVM
selftests), ignoring everything by default and allowing specific source
extensions. To accommodate this without tracking generated headers,
local_config.h is renamed to local_config.h_gen.

Changelog since v2:
- Split the changes into two separate patches (header rename and
  .gitignore update)
- Added Suggested-by for David Hildenbrand for the header rename approach.
- Dropped David's and Yosry's Reviewed-by tags.
- Kept Lorenzo Stoakes's Reviewed-by and added Mike Rapoport's Acked-by.

Changelog since v1 (RFC):
- Renamed local_config.h to local_config.h_gen to avoid conflict with !*.h.
- Updated Makefile, check_config.sh, and affected .c files for the rename.
- Removed *.mod.c as it was unnecessary.

Pratyush Mallick (2):
  selftests/mm: use pattern matching in .gitignore
  selftests/mm: rename local_config.h to local_config.h_gen

 tools/testing/selftests/mm/.gitignore      | 71 +++-------------------
 tools/testing/selftests/mm/Makefile        |  6 +-
 tools/testing/selftests/mm/check_config.sh |  2 +-
 tools/testing/selftests/mm/cow.c           |  2 +-
 tools/testing/selftests/mm/gup_longterm.c  |  2 +-
 5 files changed, 15 insertions(+), 68 deletions(-)

-- 
2.54.0.563.g4f69b47b94-goog
Re: [PATCH v3 0/2] selftests/mm: use pattern matching in .gitignore
Posted by SeongJae Park 1 month ago
On Mon, 11 May 2026 17:34:09 +0000 pratmal@google.com wrote:

> From: Pratyush Mallick <pratmal@google.com>
> 
> The current selftests/mm/.gitignore hardcodes each generated test binary
> by name, which requires manual updates every time a new test is added.
> 
> This series switches to a pattern-matching approach (similar to KVM
> selftests), ignoring everything by default and allowing specific source
> extensions. To accommodate this without tracking generated headers,
> local_config.h is renamed to local_config.h_gen.
> 
> Changelog since v2:
> - Split the changes into two separate patches (header rename and
>   .gitignore update)
> - Added Suggested-by for David Hildenbrand for the header rename approach.
> - Dropped David's and Yosry's Reviewed-by tags.
> - Kept Lorenzo Stoakes's Reviewed-by and added Mike Rapoport's Acked-by.
> 
> Changelog since v1 (RFC):
> - Renamed local_config.h to local_config.h_gen to avoid conflict with !*.h.
> - Updated Makefile, check_config.sh, and affected .c files for the rename.
> - Removed *.mod.c as it was unnecessary.

Adding previous revision links together [1] would be helpful for people who
willing to see details of previous discussions.

> 
> Pratyush Mallick (2):
>   selftests/mm: use pattern matching in .gitignore
>   selftests/mm: rename local_config.h to local_config.h_gen

So, after applying the first patch, we may show local_config.h unexpectedly
shown on 'git status' output?  Maybe too trivial thing, but I'm wondering if we
already considered doing the renaming first.

[1] https://docs.kernel.org/process/submitting-patches.html#commentary


Thanks,
SJ

[...]