selftests/bpf: Add selftest for PTR_UNTRUSTED
authorYafang Shao <laoar.shao@gmail.com>
Thu, 13 Jul 2023 02:56:42 +0000 (02:56 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 13 Jul 2023 23:24:29 +0000 (16:24 -0700)
commit1cd0e7715cad848017e48033772791e8b9ee2932
tree47417274ea2ad5044d475add990e4dcec816637f
parent33937607efa050d9e237e0c4ac4ada02d961c466
selftests/bpf: Add selftest for PTR_UNTRUSTED

Add a new selftest to check the PTR_UNTRUSTED condition. Below is the
result,

 #160     ptr_untrusted:OK

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20230713025642.27477-5-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/ptr_untrusted.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_ptr_untrusted.c [new file with mode: 0644]