Skip to content

Commit 61cfa71

Browse files
AsphalttKernel Patches Daemon
authored andcommitted
selftests/bpf: Add case to test bpf_in_interrupt kfunc
cd tools/testing/selftests/bpf ./test_progs -t irq #143/29 irq/in_interrupt:OK #143 irq:OK Summary: 1/34 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Leon Hwang <[email protected]>
1 parent 6818138 commit 61cfa71

File tree

1 file changed

+7
-0
lines changed
  • tools/testing/selftests/bpf/progs

1 file changed

+7
-0
lines changed

tools/testing/selftests/bpf/progs/irq.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,4 +563,11 @@ int irq_wrong_kfunc_class_2(struct __sk_buff *ctx)
563563
return 0;
564564
}
565565

566+
SEC("?tc")
567+
__success
568+
int in_interrupt(struct __sk_buff *ctx)
569+
{
570+
return bpf_in_interrupt();
571+
}
572+
566573
char _license[] SEC("license") = "GPL";

0 commit comments

Comments
 (0)