diff --git a/tests/helpers.sh b/tests/helpers.sh index 9b506e3..98cecda 100755 --- a/tests/helpers.sh +++ b/tests/helpers.sh @@ -140,23 +140,23 @@ assert_cgroup_not_exists() { return 0 } -# Check that BPF programs are attached via bpftool +# Check that BPF links are attached via bpftool assert_bpf_attached() { local output - output=$(bpftool prog show 2>/dev/null || true) + output=$(bpftool link show 2>/dev/null || true) if echo "$output" | grep -q "egress_rl\|ingress_rl"; then return 0 fi - test_fail "no BPF programs (egress_rl/ingress_rl) found" + test_fail "no BPF links (egress_rl/ingress_rl) found" return 1 } -# Check that BPF programs are NOT attached (after unset/clean) +# Check that BPF links are NOT attached (after unset/clean) assert_bpf_not_attached() { local output - output=$(bpftool prog show 2>/dev/null || true) + output=$(bpftool link show 2>/dev/null || true) if echo "$output" | grep -q "egress_rl\|ingress_rl"; then - test_fail "BPF programs still present after cleanup" + test_fail "BPF links still present after cleanup" return 1 fi return 0