Spdk/test/lib/event
Daniel Verkamp cbbac707c3 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: I384a3e0f56a3305bd4abfd5503325f0c10ca279e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/385677
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-11-03 16:49:38 -04:00
..
event_perf test/event_perf: fix spdk_app_stop() condition 2017-11-03 16:49:38 -04:00
reactor event: remove spdk_app_init 2017-06-15 18:26:52 -04:00
reactor_perf event: remove spdk_app_init 2017-06-15 18:26:52 -04:00
event.sh test: move subsystem_ut to unit test directory 2017-09-12 21:00:07 -04:00
Makefile test: move subsystem_ut to unit test directory 2017-09-12 21:00:07 -04:00