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.
https://ebpf-go.dev
MIT License
6.3k stars 695 forks source link

Run netkit test in separate network namespace #1577

Open ti-mo opened 1 month ago

ti-mo commented 1 month ago

This blew up on my machine today:

--- FAIL: TestNetkitAnchor (0.00s)
    quicktest.go:12:
        error:
          got non-nil value
        got:
          e"netlink receive: file exists"
        stack:
          /home/timo/github/cilium/ebpf/link/netkit_test.go:95
            qt.Assert(tb, qt.IsNil(err))
          /home/timo/github/cilium/ebpf/link/netkit_test.go:32
            linkA, ifIndex := mustAttachNetkit(t, a, ebpf.AttachNetkitPrimary)

FAIL

This test should be running in a new netns so it doesn't interfere with the host's network stack.

mingdaoy commented 18 hours ago

Hi @ti-mo I'd like to take a crack at this one. Let me know if it's still up for grabs!