diff mbox series

[bpf] bpf: selftests: Whitelist test_progs.h from .gitignore

Message ID a46f64944bf678bc652410ca6028d3450f4f7f4b.1623880296.git.dxu@dxuuu.xyz (mailing list archive)
State Accepted
Delegated to: BPF
Headers show
Series [bpf] bpf: selftests: Whitelist test_progs.h from .gitignore | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf
netdev/subject_prefix success Link
netdev/cc_maintainers fail 2 blamed authors not CCed: ast@kernel.org andrii@kernel.org; 11 maintainers not CCed: linux-kselftest@vger.kernel.org netdev@vger.kernel.org yhs@fb.com kpsingh@kernel.org daniel@iogearbox.net andrii@kernel.org kafai@fb.com ast@kernel.org john.fastabend@gmail.com songliubraving@fb.com shuah@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes fail Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Daniel Xu June 16, 2021, 9:52 p.m. UTC
Somehow test_progs.h was being included by the existing rule:

    /test_progs*

This is bad because:

    1) test_progs.h is a checked in file
    2) grep-like tools like ripgrep[0] respect gitignore and
       test_progs.h was being hidden from searches

[0]: https://github.com/BurntSushi/ripgrep

Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/
general rule")

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
---
 tools/testing/selftests/bpf/.gitignore | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrii Nakryiko June 16, 2021, 11:21 p.m. UTC | #1
On Wed, Jun 16, 2021 at 2:52 PM Daniel Xu <dxu@dxuuu.xyz> wrote:
>
> Somehow test_progs.h was being included by the existing rule:
>
>     /test_progs*
>
> This is bad because:
>
>     1) test_progs.h is a checked in file
>     2) grep-like tools like ripgrep[0] respect gitignore and
>        test_progs.h was being hidden from searches
>

Nice find, thanks! That bothered me before, but not enough to investigate :)

> [0]: https://github.com/BurntSushi/ripgrep
>
> Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/
> general rule")
>

Commit references in Fixes: tag shouldn't be wrapped. And there is no
need for an empty line. I can fix it up when applying, but just for
the future. And bpf-next is probably the right destination, I don't
think it needs to go through the bpf tree.

> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> ---
>  tools/testing/selftests/bpf/.gitignore | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
> index 4866f6a21901..d89efd9785d8 100644
> --- a/tools/testing/selftests/bpf/.gitignore
> +++ b/tools/testing/selftests/bpf/.gitignore
> @@ -10,6 +10,7 @@ FEATURE-DUMP.libbpf
>  fixdep
>  test_dev_cgroup
>  /test_progs*
> +!test_progs.h
>  test_verifier_log
>  feature
>  test_sock
> --
> 2.31.1
>
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index 4866f6a21901..d89efd9785d8 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -10,6 +10,7 @@  FEATURE-DUMP.libbpf
 fixdep
 test_dev_cgroup
 /test_progs*
+!test_progs.h
 test_verifier_log
 feature
 test_sock