test/service: fix race condition on stopping lcore
authorKevin Laatz <kevin.laatz@intel.com>
Fri, 16 Oct 2020 09:08:04 +0000 (10:08 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 16 Oct 2020 11:47:07 +0000 (13:47 +0200)
commit52bb6be259ff74495dc640e568f2115f57fc82a9
treec9b9f51b7808efca4e212b72a053e3b1620de58c
parentff3bc497e48cfecdd7dae709a37fe0253fb742ed
test/service: fix race condition on stopping lcore

There is a potential race condition in 'service_attr_get' which will cause
test failures since the service core thread is still running while the
values are being retrieved/reset.

This patch fixes the race condition by waiting for the service core thread
to stop before continuing with the unit test checks.

Fixes: 4d55194d76a4 ("service: add attribute get function")

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
app/test/test_service_cores.c