test/hash: fix perf result
authorDharmik Thakkar <dharmik.thakkar@arm.com>
Mon, 14 Jan 2019 09:23:04 +0000 (03:23 -0600)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 15 Jan 2019 01:40:41 +0000 (02:40 +0100)
commit7dbbdd3efa6777ac2a3b7cb30d1e8ebec9e5e2fd
tree180583c5d76db5ea927ed59523c365fc6613af06
parent50360349245c7eafaac4aef94be1c85948fe5690
test/hash: fix perf result

Reset 'iter' and 'tbl_rw_test_param.found' on each iteration
to give correct result for lost and duplicated keys.

This patch also changes the default return value of the test to -1
when not enough resources are provided.

Fixes: 0eb3726ebcf14 ("test/hash: add test for read/write concurrency")
Cc: stable@dpdk.org
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
test/test/test_hash_readwrite.c