selftests/bpf: Add batch ops testing for htab and htab_percpu map
authorYonghong Song <yhs@fb.com>
Wed, 15 Jan 2020 18:43:07 +0000 (10:43 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Jan 2020 22:00:35 +0000 (14:00 -0800)
commit30ff3c59137d00e083f68437665e00895cc271c7
tree703775e601e7bdc204bc5560f925cc76c5f7e371
parent2ab3d86ea1859d1a4b830ce3551cba725620593a
selftests/bpf: Add batch ops testing for htab and htab_percpu map

Tested bpf_map_lookup_batch(), bpf_map_lookup_and_delete_batch(),
bpf_map_update_batch(), and bpf_map_delete_batch() functionality.
  $ ./test_maps
    ...
      test_htab_map_batch_ops:PASS
      test_htab_percpu_map_batch_ops:PASS
    ...

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Brian Vazquez <brianvv@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200115184308.162644-9-brianvv@google.com
tools/testing/selftests/bpf/map_tests/htab_map_batch_ops.c [new file with mode: 0644]