Skip to content

Commit edefe62

Browse files
r41k0uclaude
andcommitted
Tests: Use a real program section in return, var_rval and if
These three declared @section("sometag1"), which is not a section name libbpf can map to a program type: libbpf: failed to guess program type from ELF section 'sometag1' so they were rejected before the kernel verifier ever saw them. They generate IR and compile fine; only the section was wrong. Switch to tracepoint/syscalls/sys_enter_execve, matching the other tracepoint tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent f796338 commit edefe62

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/failing_tests/if.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
@bpf
6-
@section("sometag1")
6+
@section("tracepoint/syscalls/sys_enter_execve")
77
def sometag(ctx: c_void_p) -> c_int64:
88
if 3 + 2 == 5:
99
return c_int64(5)

tests/passing_tests/return.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
@bpf
6-
@section("sometag1")
6+
@section("tracepoint/syscalls/sys_enter_execve")
77
def sometag(ctx: c_void_p) -> c_int64:
88
return c_int64(1 - 1)
99

tests/passing_tests/var_rval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
@bpf
8-
@section("sometag1")
8+
@section("tracepoint/syscalls/sys_enter_execve")
99
def sometag(ctx: c_void_p) -> c_int64:
1010
a = 1 - 1
1111
return c_int64(a)

0 commit comments

Comments
 (0)