Spdk/test/lib
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
..
bdev bdevio: call shutdown on proper thread 2017-10-23 11:55:59 -04:00
blobfs blob_bdev: hotremove support 2017-09-28 12:46:18 -04:00
env env: Remove old translation reference counting 2017-09-01 15:25:24 -04:00
event test/event_perf: fix spdk_app_stop() condition 2017-11-14 18:20:50 -05:00
ioat test: move IOAT library unit test to test/unit 2017-06-21 18:57:35 -04:00
json test: move JSON library unit tests to test/unit 2017-06-20 13:46:07 -04:00
nvme setup.sh: do not unbind NVMe devices with active mountpoints 2017-10-17 12:49:18 -04:00
Makefile test: move iSCSI unit tests to test/unit 2017-06-28 13:10:27 -04:00
test_env.c test: flesh out test_env implementation for mempools 2017-09-20 19:27:06 -04:00
ut_multithread.c test: add framework for simulating multithreading in unit tests 2017-09-20 19:27:06 -04:00