samples, bpf: Refactor test_current_task_under_cgroup - separate out helpers
authorSargun Dhillon <sargun@sargun.me>
Fri, 2 Dec 2016 10:42:18 +0000 (02:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Dec 2016 21:07:11 +0000 (16:07 -0500)
commit1a922fee66c8a691bfec738b6a5694b2dbb2177d
treea2196acc64ef60499075d0711c4a0eecb0abef09
parent69a9d09b2251aeb968e76f39f2b89774312daa3d
samples, bpf: Refactor test_current_task_under_cgroup - separate out helpers

This patch modifies test_current_task_under_cgroup_user. The test has
several helpers around creating a temporary environment for cgroup
testing, and moving the current task around cgroups. This set of
helpers can then be used in other tests.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/Makefile
samples/bpf/cgroup_helpers.c [new file with mode: 0644]
samples/bpf/cgroup_helpers.h [new file with mode: 0644]
samples/bpf/test_current_task_under_cgroup_user.c