selftests/bpf: populate map_array_ro map for verifier_array_access test
authorEduard Zingerman <eddyz87@gmail.com>
Thu, 20 Apr 2023 23:23:17 +0000 (02:23 +0300)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 20 Apr 2023 23:49:16 +0000 (16:49 -0700)
commitcbb110bc6672f785cab2cb308e9cfefee07af861
tree92e34316da9c2c9e92c8fb643ff5c488ae47602e
parent5b22f4d1436b2693c7176a76be0ba6d30503bf7c
selftests/bpf: populate map_array_ro map for verifier_array_access test

Two test cases:
- "valid read map access into a read-only array 1" and
- "valid read map access into a read-only array 2"

Expect that map_array_ro map is filled with mock data. This logic was
not taken into acount during initial test conversion.

This commit modifies prog_tests/verifier.c entry point for this test
to fill the map.

Fixes: a3c830ae0209 ("selftests/bpf: verifier/array_access.c converted to inline assembly")
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20230420232317.2181776-5-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/verifier.c
tools/testing/selftests/bpf/progs/verifier_array_access.c