cilium / ebpf

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

Home Page:https://ebpf-go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flake: TestMapIteratorAllocations

lmb opened this issue · comments

Describe the bug

Seems like TestMapIteratorAllocations is flaky.

=== FAIL: . TestMapIteratorAllocations (0.03s)
    quicktest.go:12: 
        error:
          values are not equal
        got:
          float64(1)
        want:
          float64(0)
        stack:
          /home/runner/work/ebpf/ebpf/map_test.go:1124
            qt.Assert(t, qt.Equals(allocs, float64(0)))

How to reproduce

$ go test -exec sudo -run TestMapIteratorAllocations -count 10000 .
--- FAIL: TestMapIteratorAllocations (0.00s)
    quicktest.go:12: 
        error:
          values are not equal
        got:
          float64(1)
        want:
          float64(0)
        stack:
          /home/lorenz/dev/ebpf/map_test.go:1124
            qt.Assert(t, qt.Equals(allocs, float64(0)))
        
--- FAIL: TestMapIteratorAllocations (0.00s)
    quicktest.go:12: 
        error:
          values are not equal
        got:
          float64(1)
        want:
          float64(0)
        stack:
          /home/lorenz/dev/ebpf/map_test.go:1124
            qt.Assert(t, qt.Equals(allocs, float64(0)))
        
FAIL
FAIL	github.com/cilium/ebpf	0.532s
FAIL

Version information

main

Could you describe the env with more detail?

I cannot reproduce this problem with:

CPU: Intel i7-8700K 3.7GHz
Mem: 32G
Kernel version: 6.9.10-arch1-1

I ran go test -exec sudo -run TestMapIteratorAllocations -count 10000 . multiple times and didn't reproduce the same error.