Skip to content

Commit e2c357d

Browse files
committed
link: use PlatformPrefix in TestKprobeMultiProgramCall
The test has started failing in arm64 CI because it can't find __do_sys_getpid anymore. Looking at the test it seems like we aren't using the platform prefix for the syscall wrapper appropriately. It's unclear why this used to work. Always use the correct prefix. Fixes: #1888 Signed-off-by: Lorenz Bauer <[email protected]>
1 parent d362715 commit e2c357d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

link/kprobe_multi_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/go-quicktest/qt"
1111

1212
"github.com/cilium/ebpf"
13+
"github.com/cilium/ebpf/internal/linux"
1314
"github.com/cilium/ebpf/internal/testutils"
1415
"github.com/cilium/ebpf/internal/unix"
1516
)
@@ -100,9 +101,11 @@ func TestKprobeMultiProgramCall(t *testing.T) {
100101

101102
m, p := newUpdaterMapProg(t, ebpf.Kprobe, ebpf.AttachTraceKprobeMulti)
102103

104+
// Use actual syscall names with platform prefix.
103105
// For simplicity, just assert the increment happens with any symbol in the array.
106+
prefix := linux.PlatformPrefix()
104107
opts := KprobeMultiOptions{
105-
Symbols: []string{"__do_sys_getpid", "__do_sys_gettid"},
108+
Symbols: []string{prefix + "sys_getpid", prefix + "sys_gettid"},
106109
}
107110
km, err := KprobeMulti(p, opts)
108111
if err != nil {

0 commit comments

Comments
 (0)