Commit c8745e07 authored by Prashant Bhole's avatar Prashant Bhole Committed by Daniel Borkmann

samples/bpf: detach prog from cgroup

test_cgrp2_sock.sh and test_cgrp2_sock2.sh tests keep the program
attached to cgroup even after completion.
Using detach functionality of test_cgrp2_sock in both scripts.
Signed-off-by: default avatarPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Acked-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 71d22d58
...@@ -61,6 +61,7 @@ cleanup_and_exit() ...@@ -61,6 +61,7 @@ cleanup_and_exit()
[ -n "$msg" ] && echo "ERROR: $msg" [ -n "$msg" ] && echo "ERROR: $msg"
test_cgrp2_sock -d ${CGRP_MNT}/sockopts
ip li del cgrp2_sock ip li del cgrp2_sock
umount ${CGRP_MNT} umount ${CGRP_MNT}
......
...@@ -28,6 +28,9 @@ function attach_bpf { ...@@ -28,6 +28,9 @@ function attach_bpf {
} }
function cleanup { function cleanup {
if [ -d /tmp/cgroupv2/foo ]; then
test_cgrp2_sock -d /tmp/cgroupv2/foo
fi
ip link del veth0b ip link del veth0b
ip netns delete at_ns0 ip netns delete at_ns0
umount /tmp/cgroupv2 umount /tmp/cgroupv2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment