OSDN Git Service

selftests/bpf: Move sys_pidfd_open() into task_local_storage_helpers.h
authorHou Tao <houtao1@huawei.com>
Thu, 1 Sep 2022 06:19:37 +0000 (14:19 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 1 Sep 2022 19:16:20 +0000 (12:16 -0700)
commitc710136e87747f1cc8e24948b3046ee57a1fe2eb
treea03e61d0319ebbbdf55993fd4973edb286e800ab
parentc89e843a11f1075d27684f6b42256213e4592383
selftests/bpf: Move sys_pidfd_open() into task_local_storage_helpers.h

sys_pidfd_open() is defined twice in both test_bprm_opts.c and
test_local_storage.c, so move it to a common header file. And it will be
used in map_tests as well.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/20220901061938.3789460-4-houtao@huaweicloud.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/test_bprm_opts.c
tools/testing/selftests/bpf/prog_tests/test_local_storage.c
tools/testing/selftests/bpf/task_local_storage_helpers.h [new file with mode: 0644]