Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: selftests: Use pattern matching in .gitignore

Use pattern matching to exclude everything except .c, .h, .S, and .sh
files from Git. Manually adding every test target has an absurd
maintenance cost, is comically error prone, and leads to bikeshedding
over whether or not the targets should be listed in alphabetical order.

Deliberately do not include the one-off assets, e.g. config, settings,
.gitignore itself, etc as Git doesn't ignore files that are already in
the repository. Adding the one-off assets won't prevent mistakes where
developers forget to --force add files that don't match the "allowed".

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221213001653.3852042-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Sean Christopherson and committed by
Paolo Bonzini
43e96957 d61a12cb

+6 -85
+6 -85
tools/testing/selftests/kvm/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - /aarch64/aarch32_id_regs 3 - /aarch64/arch_timer 4 - /aarch64/debug-exceptions 5 - /aarch64/get-reg-list 6 - /aarch64/hypercalls 7 - /aarch64/page_fault_test 8 - /aarch64/psci_test 9 - /aarch64/vcpu_width_config 10 - /aarch64/vgic_init 11 - /aarch64/vgic_irq 12 - /s390x/memop 13 - /s390x/resets 14 - /s390x/sync_regs_test 15 - /s390x/tprot 16 - /x86_64/amx_test 17 - /x86_64/cpuid_test 18 - /x86_64/cr4_cpuid_sync_test 19 - /x86_64/debug_regs 20 - /x86_64/exit_on_emulation_failure_test 21 - /x86_64/fix_hypercall_test 22 - /x86_64/get_msr_index_features 23 - /x86_64/kvm_clock_test 24 - /x86_64/kvm_pv_test 25 - /x86_64/hyperv_clock 26 - /x86_64/hyperv_cpuid 27 - /x86_64/hyperv_evmcs 28 - /x86_64/hyperv_features 29 - /x86_64/hyperv_ipi 30 - /x86_64/hyperv_svm_test 31 - /x86_64/hyperv_tlb_flush 32 - /x86_64/max_vcpuid_cap_test 33 - /x86_64/mmio_warning_test 34 - /x86_64/monitor_mwait_test 35 - /x86_64/nested_exceptions_test 36 - /x86_64/nx_huge_pages_test 37 - /x86_64/platform_info_test 38 - /x86_64/pmu_event_filter_test 39 - /x86_64/set_boot_cpu_id 40 - /x86_64/set_sregs_test 41 - /x86_64/sev_migrate_tests 42 - /x86_64/smaller_maxphyaddr_emulation_test 43 - /x86_64/smm_test 44 - /x86_64/state_test 45 - /x86_64/svm_vmcall_test 46 - /x86_64/svm_int_ctl_test 47 - /x86_64/svm_nested_soft_inject_test 48 - /x86_64/svm_nested_shutdown_test 49 - /x86_64/sync_regs_test 50 - /x86_64/tsc_msrs_test 51 - /x86_64/tsc_scaling_sync 52 - /x86_64/ucna_injection_test 53 - /x86_64/userspace_io_test 54 - /x86_64/userspace_msr_exit_test 55 - /x86_64/vmx_apic_access_test 56 - /x86_64/vmx_close_while_nested_test 57 - /x86_64/vmx_dirty_log_test 58 - /x86_64/vmx_exception_with_invalid_guest_state 59 - /x86_64/vmx_invalid_nested_guest_state 60 - /x86_64/vmx_msrs_test 61 - /x86_64/vmx_preemption_timer_test 62 - /x86_64/vmx_set_nested_state_test 63 - /x86_64/vmx_tsc_adjust_test 64 - /x86_64/vmx_nested_tsc_scaling_test 65 - /x86_64/xapic_ipi_test 66 - /x86_64/xapic_state_test 67 - /x86_64/xen_shinfo_test 68 - /x86_64/xen_vmcall_test 69 - /x86_64/xss_msr_test 70 - /x86_64/vmx_pmu_caps_test 71 - /x86_64/triple_fault_event_test 72 - /access_tracking_perf_test 73 - /demand_paging_test 74 - /dirty_log_test 75 - /dirty_log_perf_test 76 - /hardware_disable_test 77 - /kvm_create_max_vcpus 78 - /kvm_page_table_test 79 - /max_guest_memory_test 80 - /memslot_modification_stress_test 81 - /memslot_perf_test 82 - /rseq_test 83 - /set_memory_region_test 84 - /steal_time 85 - /kvm_binary_stats_test 86 - /system_counter_offset_test 2 + * 3 + !/**/ 4 + !*.c 5 + !*.h 6 + !*.S 7 + !*.sh