Thread (22 messages) flat view 22 messages, 4 authors, 2020-03-29

Re: [PATCH v4 2/2] selftests: Add test for overriding global data value before load

From: Andrii Nakryiko <hidden>
Date: 2020-03-29 20:14:07
Also in: bpf

On Sun, Mar 29, 2020 at 6:23 AM Toke Høiland-Jørgensen [off-list ref] wrote:
This adds a test to exercise the new bpf_map__set_initial_value() function.
The test simply overrides the global data section with all zeroes, and
checks that the new value makes it into the kernel map on load.

Signed-off-by: Toke Høiland-Jørgensen <redacted>
---
I guess given you don't attach or run any BPF program, it's fine to
reuse test_global_data.o for this.

Acked-by: Andrii Nakryiko <redacted>

 .../bpf/prog_tests/global_data_init.c         | 61 +++++++++++++++++++
 .../selftests/bpf/progs/test_global_data.c    |  2 +-
 2 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/global_data_init.c
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help