From: Pratyush Mallick <[email protected]> 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. Note that un-ignoring *.h files causes the generated local_config.h build artifact to incorrectly become untracked. A subsequent patch will rename this header to resolve the issue. Reviewed-by: Lorenzo Stoakes <[email protected]> Acked-by: Mike Rapoport (Microsoft) <[email protected]> Suggested-by: Yosry Ahmed <[email protected]> Signed-off-by: Pratyush Mallick <[email protected]> --- tools/testing/selftests/mm/.gitignore | 71 ++++----------------------- 1 file changed, 9 insertions(+), 62 deletions(-) diff --git a/tools/testing/selftests/mm/.gitignore b/tools/testing/selftests/mm/.gitignore index 83ad9454dd9d..fcd892ed21e3 100644 --- a/tools/testing/selftests/mm/.gitignore +++ b/tools/testing/selftests/mm/.gitignore @@ -1,63 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only -cow -hugepage-mmap -hugepage-mremap -hugepage-shm -hugepage-vmemmap -hugetlb-madvise -hugetlb-read-hwpoison -hugetlb-soft-offline -khugepaged -map_hugetlb -map_populate -thuge-gen -compaction_test -memory-failure -migration -mlock2-tests -mrelease_test -mremap_dontunmap -mremap_test -on-fault-limit -transhuge-stress -pagemap_ioctl -pfnmap -process_madv -*.tmp* -protection_keys -protection_keys_32 -protection_keys_64 -madv_populate -uffd-stress -uffd-unit-tests -uffd-wp-mremap -mlock-intersect-test -mlock-random-test -virtual_address_range -gup_test -va_128TBswitch -map_fixed_noreplace -write_to_hugetlbfs -hmm-tests -memfd_secret -soft-dirty -split_huge_page_test -ksm_tests -local_config.h -local_config.mk -ksm_functional_tests -mdwe_test -gup_longterm -mkdirty -va_high_addr_switch -hugetlb_fault_after_madv -hugetlb_madv_vs_map -mseal_test -droppable -hugetlb_dio -pkey_sighandler_tests_32 -pkey_sighandler_tests_64 -guard-regions -merge -prctl_thp_disable -rmap +* +!/**/ +!*.c +!*.h +!*.sh +!.gitignore +!Makefile +!config +!settings -- 2.54.0.563.g4f69b47b94-goog

