selftests/bpf: Add parallel support for classid
authorYafang Shao <laoar.shao@gmail.com>
Sat, 11 Nov 2023 09:00:31 +0000 (09:00 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 14 Nov 2023 16:56:56 +0000 (08:56 -0800)
commitf744d35ecf46f111bf9b54bfdbc89a28ee8b928a
tree39232ed4ba0c9950a71741bbc426703936f0834e
parent4849775587844e44d215289c425bcd70f315efe7
selftests/bpf: Add parallel support for classid

Include the current pid in the classid cgroup path. This way, different
testers relying on classid-based configurations will have distinct classid
cgroup directories, enabling them to run concurrently. Additionally, we
leverage the current pid as the classid, ensuring unique identification.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20231111090034.4248-4-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/cgroup_helpers.c
tools/testing/selftests/bpf/cgroup_helpers.h
tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c