Skip to content

Commit 4fe44d7

Browse files
committed
tests: check_selftest: ignore BPF objects
BPF object files (e.g. prog.bpf.c) have automatic build rules and end up creating files ending with .o. So they usually don't need dedicated entries in .gitignore or the Makefile. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 8746834 commit 4fe44d7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/patch/check_selftest/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def check_new_files_makefile(tree, new_files, log):
3636
for path in new_files:
3737
if path.endswith(('.sh', '.py')):
3838
needle = path
39-
elif path.endswith(('.c')):
39+
elif path.endswith(('.c')) and not path.endswith(('.bpf.c')):
4040
needle = path.split('.')[0]
4141
else:
4242
log.append("makefile inclusion check ignoring " + path)
@@ -66,7 +66,7 @@ def check_new_files_gitignore(tree, new_files, log):
6666
cnt = 0
6767

6868
for path in new_files:
69-
if path.endswith(('.c')):
69+
if path.endswith(('.c')) and not path.endswith(('.bpf.c')):
7070
needle = path.split('.')[0]
7171
else:
7272
log.append("gitignore check ignoring " + path)

0 commit comments

Comments
 (0)