Skip to content

Commit 67db25c

Browse files
committed
testenv: Check for /sys/fs/bpf mount in root namespace
We mention in basic04 that the testenv does this, so better make sure it does :) Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
1 parent bf5182b commit 67db25c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

testenv/testenv.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ setup()
202202

203203
CLEANUP_FUNC=cleanup_setup
204204

205+
if ! mount | grep -q /sys/fs/bpf; then
206+
mount -t bpf bpf /sys/fs/bpf/
207+
fi
208+
205209
ip netns add "$NS"
206210
ip link add dev "$NS" type veth peer name "$PEERNAME"
207211
OUTSIDE_MAC=$(iface_macaddr "$NS")

0 commit comments

Comments
 (0)