test/hash: add lock-free r/w concurrency
authorDharmik Thakkar <dharmik.thakkar@arm.com>
Fri, 26 Oct 2018 05:37:33 +0000 (00:37 -0500)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 26 Oct 2018 10:50:43 +0000 (12:50 +0200)
commitc7eb0972e74b013491c49edea55d7763cdfe7d7a
treef9a985c58fd04b808d8a0b65bbb6eb794c933741
parente605a1d36ca7ee9182c43d1ec912eeb90cc7fd64
test/hash: add lock-free r/w concurrency

Unit tests to check for hash lookup and bulk-lookup perf
with lock-free enabled and with lock-free disabled.
Unit tests performed with readers running in parallel with writers.

Tests include:

- hash lookup on existing keys with:
  - hash add causing NO key-shifts of existing keys in the table

- hash lookup on existing keys likely to be on shift-path with:
  - hash add causing key-shifts of existing keys in the table

- hash lookup on existing keys NOT likely to be on shift-path with:
  - hash add causing key-shifts of existing keys in the table

- hash lookup on non-existing keys with:
  - hash add causing NO key-shifts of existing keys in the table
  - hash add causing key-shifts of existing keys in the table

- hash lookup on keys likely to be on shift-path with:
  - multiple writers causing key-shifts of existing keys in the table

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
test/test/Makefile
test/test/autotest_data.py
test/test/meson.build
test/test/test_hash_readwrite_lf.c [new file with mode: 0644]