Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down