Skip to contentSkip to conversation

KVM: selftests: Explicitly include committed one-off assets in .gitignore

PATCH In review Sean Christopherson 1 participant 2 messages Aug 28, 2024 – Aug 31, 2024

Subsystems (2)
lore
Share & tools
lore

Sean Christopherson

author reviewer
#0 lore raw

PATCH 1/1 KVM: selftests: Explicitly include committed one-off assets in .gitignore

Add KVM selftests' one-off assets, e.g. the Makefile, to the .gitignore so that they are explicitly included. The justification for omitting the one-offs was that including them wouldn't help prevent mistakes:

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".

Turns out that's not the case, as W=1 will generate warnings, and the amazing-as-always kernel test bot reports new warnings:

tools/testing/selftests/kvm/.gitignore: warning: ignored by one of the .gitignore files tools/testing/selftests/kvm/Makefile: warning: ignored by one of the .gitignore files

Quoted 1 line
Quoted 1 line

tools/testing/selftests/kvm/Makefile.kvm: warning: ignored by one of the .gitignore files

tools/testing/selftests/kvm/config: warning: ignored by one of the .gitignore files tools/testing/selftests/kvm/settings: warning: ignored by one of the .gitignore files

Fixes 43e96957e8b8 ("KVM: selftests: Use pattern matching in .gitignore")
---
 tools/testing/selftests/kvm/.gitignore | 4 ++++
 1 file changed, 4 insertions(+)
tools/testing/selftests/kvm/.gitignore +4 -0
index 6d9381d60172..7f57abf936e7 100644
@@ -5,3 +5,7 @@
 !*.h
 !*.S
 !*.sh
+!.gitignore
+!config
+!settings
+!Makefile

base-commit: 15e1c3d65975524c5c792fcd59f7d89f00402261

Signature · 1 line
2.46.0.295.g3b9ea8a38a-goog
author reviewer
#1 lore raw
Quoted 10 lines · Sean Christopherson

Add KVM selftests' one-off assets, e.g. the Makefile, to the .gitignore so that they are explicitly included. The justification for omitting the one-offs was that including them wouldn't help prevent mistakes:

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".

[...]

Applied to kvm-x86 selftests, thanks!

[1/1] KVM: selftests: Explicitly include committed one-off assets in .gitignore

      https://github.com/kvm-x86/linux/commit/9d15171f39f0

--
https://github.com/kvm-x86/linux/tree/next