selftests/bpf: Add test cases for htab update
authorHou Tao <houtao1@huawei.com>
Wed, 31 Aug 2022 04:26:29 +0000 (12:26 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 31 Aug 2022 21:10:01 +0000 (14:10 -0700)
commit1c636b6277a2b2bf504df490b8dbadd2bd34ccd4
treec29c585d2a6ff15141ee83ee4f67c2b9569eec20
parent66a7a92e4d0d091e79148a4c6ec15d1da65f4280
selftests/bpf: Add test cases for htab update

One test demonstrates the reentrancy of hash map update on the same
bucket should fail, and another one shows concureently updates of
the same hash map bucket should succeed and not fail due to
the reentrancy checking for bucket lock.

There is no trampoline support on s390x, so move htab_update to
denylist.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20220831042629.130006-4-houtao@huaweicloud.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/DENYLIST.s390x
tools/testing/selftests/bpf/prog_tests/htab_update.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/htab_update.c [new file with mode: 0644]