diff options
author | 2018-03-01 14:47:40 +0900 | |
---|---|---|
committer | 2018-03-02 00:16:36 +0100 | |
commit | c8745e07d5d676b2cb49f90baec1ac5e66cb7383 (patch) | |
tree | 013b6aaa03d8c309e329fdfcf112b0045fe1e6b9 /samples/bpf/test_cgrp2_sock2.sh | |
parent | bpf, x64: remove bpf_flush_icache (diff) | |
download | linux-c8745e07d5d676b2cb49f90baec1ac5e66cb7383.tar.gz linux-c8745e07d5d676b2cb49f90baec1ac5e66cb7383.tar.bz2 linux-c8745e07d5d676b2cb49f90baec1ac5e66cb7383.zip |
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>
Diffstat (limited to 'samples/bpf/test_cgrp2_sock2.sh')
-rwxr-xr-x | samples/bpf/test_cgrp2_sock2.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/samples/bpf/test_cgrp2_sock2.sh b/samples/bpf/test_cgrp2_sock2.sh index fc4e64d00cb3..0f396a86e0cb 100755 --- a/samples/bpf/test_cgrp2_sock2.sh +++ b/samples/bpf/test_cgrp2_sock2.sh @@ -28,6 +28,9 @@ function attach_bpf { } function cleanup { + if [ -d /tmp/cgroupv2/foo ]; then + test_cgrp2_sock -d /tmp/cgroupv2/foo + fi ip link del veth0b ip netns delete at_ns0 umount /tmp/cgroupv2 |