Re: [PATCH v2] selftests/mm: use pattern matching in .gitignore
From: Mike Rapoport
Date: Fri May 08 2026 - 14:30:08 EST
On Tue, May 05, 2026 at 03:22:28PM +0000, pratmal@xxxxxxxxxx wrote:
> From: Pratyush Mallick <pratmal@xxxxxxxxxx>
>
> The current .gitignore hardcodes each generated test binary by name,
> requiring updates every time a new test is added.
>
> Switch to the patten-matching approach similar to KVM:selftests.
> Ignore everything by default and then allow source extensions (.c, .h, .sh)
> and tracked non-source files.
>
> To avoid un-ignoring the generated headers, rename local_config.h to
> local_config.h_gen.
>
> Acked-by: Lorenzo Stoakes <ljs@xxxxxxxxxx>
> Reviewed-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx>
> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
> Signed-off-by: Pratyush Mallick <pratmal@xxxxxxxxxx>
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> ---
> 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.
>
> 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(-)
--
Sincerely yours,
Mike.