Spdk/test
Daniel Verkamp 6890888888 test/event_perf: fix spdk_app_stop() condition
Make sure the event_perf example calls spdk_app_stop() exactly once by
using an atomic flag to track when it has been called.

Previously, if the timing happens to be right, the current events at the
point where spdk_get_ticks() > g_tsc_end becomes true may not be running
on the master core, so none of the submit_new_event() calls that are
currently running will call spdk_app_stop(), and no new events will be
sent, so the test hangs.

Also, since event_work_fn() sends multiple events, spdk_app_stop() could
be called more than once, since all of the events would be executing on
the master core.

Change-Id: Ie010ac3e7a3ff0d89a9390a11417a69f8324316e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387066
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-14 18:20:50 -05:00
..
app app: spdk_app_fini no longer gives return code 2017-10-10 10:56:34 -04:00
blobfs/rocksdb test/blobfs: add timing for rocksdb benchmarks 2017-09-20 19:33:50 -04:00
cpp_headers test/cpp_headers: autogenerate header test files 2016-10-03 10:24:18 -07:00
iscsi_tgt lvol: add lvs name in rpc calls 2017-10-27 13:10:21 -04:00
lib test/event_perf: fix spdk_app_stop() condition 2017-11-14 18:20:50 -05:00
lvol test/lvol: update test plan with tasting test 2017-10-27 15:42:47 -04:00
nvmf lvol: add lvs name in rpc calls 2017-10-27 13:10:21 -04:00
pmem test/pmem: RPC pmem functional tests. 2017-10-19 15:16:05 -04:00
unit lvol: read lvols names on lvol store tasting 2017-11-10 17:25:20 -05:00
vhost lvol: add lvs name in rpc calls 2017-10-27 13:10:21 -04:00
Makefile test: begin moving unit tests into test/unit 2017-06-16 16:43:48 -04:00
spdk_cunit.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00