test/distributor: fix spurious failure
authorRuifeng Wang <ruifeng.wang@arm.com>
Tue, 15 Oct 2019 09:28:26 +0000 (17:28 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 08:27:51 +0000 (10:27 +0200)
commit0a82b96e36746608eee9f1f71e2258d9c0099575
treebbe39eeebc5e6a1e8300ce4b76399ee687b7bd90
parent52833924822490391df3dce3eec3a2ee7777acc5
test/distributor: fix spurious failure

Sanity test could spuriously fail with reporting flush count error.
It was caused by worker stat coherent issue between distributor and
worker thread.
Fix this issue by using atomic operations to update worker stat.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
app/test/test_distributor.c