]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Create task_local_storage map with invalid uptr's struct
authorMartin KaFai Lau <martin.lau@kernel.org>
Wed, 23 Oct 2024 23:47:59 +0000 (16:47 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 24 Oct 2024 17:26:00 +0000 (10:26 -0700)
commitbd5879a6fe4be407bf36c212cd91ed1e4485a6f9
tree160ed2ab568f0fc513ccda0dfa19b08dfd00f4a1
parent898cbca4a7579bea3ab746cd8dc33027bff80dac
selftests/bpf: Create task_local_storage map with invalid uptr's struct

This patch tests the map creation failure when the map_value
has unsupported uptr. The three cases are the struct is larger
than one page, the struct is empty, and the struct is a kernel struct.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20241023234759.860539-13-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
tools/testing/selftests/bpf/progs/uptr_map_failure.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_progs.h
tools/testing/selftests/bpf/uptr_test_common.h