[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180301054740.6208-1-bhole_prashant_q7@lab.ntt.co.jp>
Date: Thu, 1 Mar 2018 14:47:40 +0900
From: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
To: "David S . Miller" <davem@...emloft.net>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>
Cc: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>,
David Ahern <dsa@...ulusnetworks.com>, netdev@...r.kernel.org
Subject: [PATCH bpf-next] 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@....ntt.co.jp>
---
samples/bpf/test_cgrp2_sock.sh | 1 +
samples/bpf/test_cgrp2_sock2.sh | 3 +++
2 files changed, 4 insertions(+)
diff --git a/samples/bpf/test_cgrp2_sock.sh b/samples/bpf/test_cgrp2_sock.sh
index 8ee0371a100a..9f6174236856 100755
--- a/samples/bpf/test_cgrp2_sock.sh
+++ b/samples/bpf/test_cgrp2_sock.sh
@@ -61,6 +61,7 @@ cleanup_and_exit()
[ -n "$msg" ] && echo "ERROR: $msg"
+ test_cgrp2_sock -d ${CGRP_MNT}/sockopts
ip li del cgrp2_sock
umount ${CGRP_MNT}
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
--
2.13.6
Powered by blists - more mailing lists