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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 29, 2020 at 6:23 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> 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 <toke@xxxxxxxxxx>
> ---

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 <andriin@xxxxxx>


>  .../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
>

[...]




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux