Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

authored by

Prashant Bhole and committed by
Daniel Borkmann
c8745e07 71d22d58

+4
+1
samples/bpf/test_cgrp2_sock.sh
··· 61 61 62 62 [ -n "$msg" ] && echo "ERROR: $msg" 63 63 64 + test_cgrp2_sock -d ${CGRP_MNT}/sockopts 64 65 ip li del cgrp2_sock 65 66 umount ${CGRP_MNT} 66 67
+3
samples/bpf/test_cgrp2_sock2.sh
··· 28 28 } 29 29 30 30 function cleanup { 31 + if [ -d /tmp/cgroupv2/foo ]; then 32 + test_cgrp2_sock -d /tmp/cgroupv2/foo 33 + fi 31 34 ip link del veth0b 32 35 ip netns delete at_ns0 33 36 umount /tmp/cgroupv2