From daa89d71af8fb50442d40bb551485ef3a9399b68 Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Mon, 23 Apr 2018 16:36:21 +0200
Subject: [PATCH] selftests: update .gitignore files

Consolidate all artifacts named *test* in the .gitignore file in the
selftests directory. That way we don't need to update them all the test
directories .gitignore files when the artifact are named *test*. Now the
.gitignore file skips to ignore *.(c|h|sh) files.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 tools/testing/selftests/.gitignore            |  4 ++++
 .../testing/selftests/android/ion/.gitignore  |  1 -
 tools/testing/selftests/bpf/.gitignore        | 14 ------------
 .../testing/selftests/breakpoints/.gitignore  |  2 --
 .../testing/selftests/capabilities/.gitignore |  1 -
 .../testing/selftests/filesystems/.gitignore  |  1 -
 tools/testing/selftests/ia64/.gitignore       |  1 -
 tools/testing/selftests/ipc/.gitignore        |  1 -
 tools/testing/selftests/kcmp/.gitignore       |  2 --
 .../testing/selftests/media_tests/.gitignore  |  2 --
 tools/testing/selftests/membarrier/.gitignore |  1 -
 tools/testing/selftests/memfd/.gitignore      |  3 ---
 tools/testing/selftests/mount/.gitignore      |  1 -
 tools/testing/selftests/mqueue/.gitignore     |  2 --
 .../testing/selftests/powerpc/dscr/.gitignore |  7 ------
 tools/testing/selftests/powerpc/mm/.gitignore |  1 -
 .../testing/selftests/powerpc/pmu/.gitignore  |  1 -
 .../selftests/powerpc/pmu/ebb/.gitignore      | 22 -------------------
 .../powerpc/switch_endian/.gitignore          |  1 -
 .../testing/selftests/powerpc/vphn/.gitignore |  1 -
 tools/testing/selftests/prctl/.gitignore      |  3 ---
 tools/testing/selftests/ptp/.gitignore        |  1 -
 tools/testing/selftests/sync/.gitignore       |  1 -
 tools/testing/selftests/timers/.gitignore     |  3 ---
 tools/testing/selftests/vDSO/.gitignore       |  2 --
 tools/testing/selftests/vm/.gitignore         |  4 ----
 tools/testing/selftests/watchdog/.gitignore   |  1 -
 tools/testing/selftests/x86/.gitignore        |  3 ---
 28 files changed, 4 insertions(+), 83 deletions(-)

diff --git a/tools/testing/selftests/.gitignore b/tools/testing/selftests/.gitignore
index 91750352459d..aedb230a1619 100644
--- a/tools/testing/selftests/.gitignore
+++ b/tools/testing/selftests/.gitignore
@@ -3,3 +3,7 @@ gpiogpio-event-mon
 gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
+*test*
+!*.c
+!*.h
+!*.sh
diff --git a/tools/testing/selftests/android/ion/.gitignore b/tools/testing/selftests/android/ion/.gitignore
index 95e8f4561474..67e6f391b2a9 100644
--- a/tools/testing/selftests/android/ion/.gitignore
+++ b/tools/testing/selftests/android/ion/.gitignore
@@ -1,3 +1,2 @@
 ionapp_export
 ionapp_import
-ionmap_test
diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index 9513c77d8a7e..d63dee0fbe10 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -1,18 +1,4 @@
-test_verifier
-test_maps
-test_lru_map
-test_lpm_map
-test_tag
 FEATURE-DUMP.libbpf
 fixdep
-test_align
-test_dev_cgroup
-test_progs
-test_tcpbpf_user
-test_verifier_log
 feature
-test_libbpf_open
-test_btf
-test_sock
-test_sock_addr
 urandom_read
diff --git a/tools/testing/selftests/breakpoints/.gitignore b/tools/testing/selftests/breakpoints/.gitignore
index a23bb4a6f06c..e69de29bb2d1 100644
--- a/tools/testing/selftests/breakpoints/.gitignore
+++ b/tools/testing/selftests/breakpoints/.gitignore
@@ -1,2 +0,0 @@
-breakpoint_test
-step_after_suspend_test
diff --git a/tools/testing/selftests/capabilities/.gitignore b/tools/testing/selftests/capabilities/.gitignore
index b732dd0d4738..b80e4cfc3d7d 100644
--- a/tools/testing/selftests/capabilities/.gitignore
+++ b/tools/testing/selftests/capabilities/.gitignore
@@ -1,2 +1 @@
-test_execve
 validate_cap
diff --git a/tools/testing/selftests/filesystems/.gitignore b/tools/testing/selftests/filesystems/.gitignore
index 8449cf6716ce..88098eb26e39 100644
--- a/tools/testing/selftests/filesystems/.gitignore
+++ b/tools/testing/selftests/filesystems/.gitignore
@@ -1,2 +1 @@
-dnotify_test
 devpts_pts
diff --git a/tools/testing/selftests/ia64/.gitignore b/tools/testing/selftests/ia64/.gitignore
index ab806edc8732..e69de29bb2d1 100644
--- a/tools/testing/selftests/ia64/.gitignore
+++ b/tools/testing/selftests/ia64/.gitignore
@@ -1 +0,0 @@
-aliasing-test
diff --git a/tools/testing/selftests/ipc/.gitignore b/tools/testing/selftests/ipc/.gitignore
index 9af04c9353c0..30da9dade044 100644
--- a/tools/testing/selftests/ipc/.gitignore
+++ b/tools/testing/selftests/ipc/.gitignore
@@ -1,2 +1 @@
-msgque_test
 msgque
diff --git a/tools/testing/selftests/kcmp/.gitignore b/tools/testing/selftests/kcmp/.gitignore
index 5a9b3732b2de..e69de29bb2d1 100644
--- a/tools/testing/selftests/kcmp/.gitignore
+++ b/tools/testing/selftests/kcmp/.gitignore
@@ -1,2 +0,0 @@
-kcmp_test
-kcmp-test-file
diff --git a/tools/testing/selftests/media_tests/.gitignore b/tools/testing/selftests/media_tests/.gitignore
index 8745eba39012..b58f221ede47 100644
--- a/tools/testing/selftests/media_tests/.gitignore
+++ b/tools/testing/selftests/media_tests/.gitignore
@@ -1,3 +1 @@
-media_device_test
 media_device_open
-video_device_test
diff --git a/tools/testing/selftests/membarrier/.gitignore b/tools/testing/selftests/membarrier/.gitignore
index 020c44f49a9e..e69de29bb2d1 100644
--- a/tools/testing/selftests/membarrier/.gitignore
+++ b/tools/testing/selftests/membarrier/.gitignore
@@ -1 +0,0 @@
-membarrier_test
diff --git a/tools/testing/selftests/memfd/.gitignore b/tools/testing/selftests/memfd/.gitignore
index afe87c40ac80..d614d5c1c176 100644
--- a/tools/testing/selftests/memfd/.gitignore
+++ b/tools/testing/selftests/memfd/.gitignore
@@ -1,4 +1 @@
 fuse_mnt
-fuse_test
-memfd_test
-memfd-test-file
diff --git a/tools/testing/selftests/mount/.gitignore b/tools/testing/selftests/mount/.gitignore
index 856ad4107eb3..e69de29bb2d1 100644
--- a/tools/testing/selftests/mount/.gitignore
+++ b/tools/testing/selftests/mount/.gitignore
@@ -1 +0,0 @@
-unprivileged-remount-test
diff --git a/tools/testing/selftests/mqueue/.gitignore b/tools/testing/selftests/mqueue/.gitignore
index d8d42377205a..e69de29bb2d1 100644
--- a/tools/testing/selftests/mqueue/.gitignore
+++ b/tools/testing/selftests/mqueue/.gitignore
@@ -1,2 +0,0 @@
-mq_open_tests
-mq_perf_tests
diff --git a/tools/testing/selftests/powerpc/dscr/.gitignore b/tools/testing/selftests/powerpc/dscr/.gitignore
index b585c6c1564a..e69de29bb2d1 100644
--- a/tools/testing/selftests/powerpc/dscr/.gitignore
+++ b/tools/testing/selftests/powerpc/dscr/.gitignore
@@ -1,7 +0,0 @@
-dscr_default_test
-dscr_explicit_test
-dscr_inherit_exec_test
-dscr_inherit_test
-dscr_sysfs_test
-dscr_sysfs_thread_test
-dscr_user_test
diff --git a/tools/testing/selftests/powerpc/mm/.gitignore b/tools/testing/selftests/powerpc/mm/.gitignore
index 7d7c42ed6de9..722ae64fa525 100644
--- a/tools/testing/selftests/powerpc/mm/.gitignore
+++ b/tools/testing/selftests/powerpc/mm/.gitignore
@@ -1,4 +1,3 @@
-hugetlb_vs_thp_test
 subpage_prot
 tempfile
 prot_sao
diff --git a/tools/testing/selftests/powerpc/pmu/.gitignore b/tools/testing/selftests/powerpc/pmu/.gitignore
index e748f336eed3..42d8657c5a1a 100644
--- a/tools/testing/selftests/powerpc/pmu/.gitignore
+++ b/tools/testing/selftests/powerpc/pmu/.gitignore
@@ -1,3 +1,2 @@
 count_instructions
-l3_bank_test
 per_event_excludes
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/.gitignore b/tools/testing/selftests/powerpc/pmu/ebb/.gitignore
index 42bddbed8b64..e69de29bb2d1 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/.gitignore
+++ b/tools/testing/selftests/powerpc/pmu/ebb/.gitignore
@@ -1,22 +0,0 @@
-reg_access_test
-event_attributes_test
-cycles_test
-cycles_with_freeze_test
-pmc56_overflow_test
-ebb_vs_cpu_event_test
-cpu_event_vs_ebb_test
-cpu_event_pinned_vs_ebb_test
-task_event_vs_ebb_test
-task_event_pinned_vs_ebb_test
-multi_ebb_procs_test
-multi_counter_test
-pmae_handling_test
-close_clears_pmcc_test
-instruction_count_test
-fork_cleanup_test
-ebb_on_child_test
-ebb_on_willing_child_test
-back_to_back_ebbs_test
-lost_exception_test
-no_handler_test
-cycles_with_mmcr2_test
diff --git a/tools/testing/selftests/powerpc/switch_endian/.gitignore b/tools/testing/selftests/powerpc/switch_endian/.gitignore
index 89e762eab676..0d661c8d86d8 100644
--- a/tools/testing/selftests/powerpc/switch_endian/.gitignore
+++ b/tools/testing/selftests/powerpc/switch_endian/.gitignore
@@ -1,2 +1 @@
-switch_endian_test
 check-reversed.S
diff --git a/tools/testing/selftests/powerpc/vphn/.gitignore b/tools/testing/selftests/powerpc/vphn/.gitignore
index 7c04395010cb..e69de29bb2d1 100644
--- a/tools/testing/selftests/powerpc/vphn/.gitignore
+++ b/tools/testing/selftests/powerpc/vphn/.gitignore
@@ -1 +0,0 @@
-test-vphn
diff --git a/tools/testing/selftests/prctl/.gitignore b/tools/testing/selftests/prctl/.gitignore
index 0b5c27447bf6..e69de29bb2d1 100644
--- a/tools/testing/selftests/prctl/.gitignore
+++ b/tools/testing/selftests/prctl/.gitignore
@@ -1,3 +0,0 @@
-disable-tsc-ctxt-sw-stress-test
-disable-tsc-on-off-stress-test
-disable-tsc-test
diff --git a/tools/testing/selftests/ptp/.gitignore b/tools/testing/selftests/ptp/.gitignore
index f562e49d6917..e69de29bb2d1 100644
--- a/tools/testing/selftests/ptp/.gitignore
+++ b/tools/testing/selftests/ptp/.gitignore
@@ -1 +0,0 @@
-testptp
diff --git a/tools/testing/selftests/sync/.gitignore b/tools/testing/selftests/sync/.gitignore
index f5091e7792f2..e69de29bb2d1 100644
--- a/tools/testing/selftests/sync/.gitignore
+++ b/tools/testing/selftests/sync/.gitignore
@@ -1 +0,0 @@
-sync_test
diff --git a/tools/testing/selftests/timers/.gitignore b/tools/testing/selftests/timers/.gitignore
index 2c8ac8416299..bcea43528de7 100644
--- a/tools/testing/selftests/timers/.gitignore
+++ b/tools/testing/selftests/timers/.gitignore
@@ -9,14 +9,11 @@ nanosleep
 nsleep-lat
 posix_timers
 raw_skew
-rtctest
 set-2038
 set-tai
 set-timer-lat
 skew_consistency
-threadtest
 valid-adjtimex
 adjtick
 set-tz
 freq-step
-rtctest_setdate
diff --git a/tools/testing/selftests/vDSO/.gitignore b/tools/testing/selftests/vDSO/.gitignore
index 133bf9ee986c..e69de29bb2d1 100644
--- a/tools/testing/selftests/vDSO/.gitignore
+++ b/tools/testing/selftests/vDSO/.gitignore
@@ -1,2 +0,0 @@
-vdso_test
-vdso_standalone_test_x86
diff --git a/tools/testing/selftests/vm/.gitignore b/tools/testing/selftests/vm/.gitignore
index 342c7bc9dc8c..8af0f9b1f86c 100644
--- a/tools/testing/selftests/vm/.gitignore
+++ b/tools/testing/selftests/vm/.gitignore
@@ -2,13 +2,9 @@ hugepage-mmap
 hugepage-shm
 map_hugetlb
 thuge-gen
-compaction_test
-mlock2-tests
 on-fault-limit
 transhuge-stress
 userfaultfd
-mlock-intersect-test
-mlock-random-test
 virtual_address_range
 gup_benchmark
 va_128TBswitch
diff --git a/tools/testing/selftests/watchdog/.gitignore b/tools/testing/selftests/watchdog/.gitignore
index 5aac51575c7e..e69de29bb2d1 100644
--- a/tools/testing/selftests/watchdog/.gitignore
+++ b/tools/testing/selftests/watchdog/.gitignore
@@ -1 +0,0 @@
-watchdog-test
diff --git a/tools/testing/selftests/x86/.gitignore b/tools/testing/selftests/x86/.gitignore
index 7757f73ff9a3..c65da55af335 100644
--- a/tools/testing/selftests/x86/.gitignore
+++ b/tools/testing/selftests/x86/.gitignore
@@ -4,12 +4,9 @@ single_step_syscall
 sysret_ss_attrs
 syscall_nt
 ptrace_syscall
-test_mremap_vdso
 check_initial_reg_state
 sigreturn
 ldt_gdt
 iopl
-mpx-mini-test
 ioperm
 protection_keys
-test_vdso
-- 
2.17.0

