tools/bpf: add a selftest for bpf_get_current_cgroup_id() helper
Syscall name_to_handle_at() can be used to get cgroup id for a particular cgroup path in user space. The selftest got cgroup id from both user and kernel, and compare to ensure they are equal to each other. Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:

committed by
Alexei Starovoitov

parent
c7ddbbaf1e
commit
f269099a7e
@@ -13,5 +13,6 @@ int create_and_get_cgroup(char *path);
|
||||
int join_cgroup(char *path);
|
||||
int setup_cgroup_environment(void);
|
||||
void cleanup_cgroup_environment(void);
|
||||
unsigned long long get_cgroup_id(char *path);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user