+41
−33
Loading
It was too difficult for us to add unit test for _spdk_reactor_run() because the main polling loop in _spdk_reactor_run() was infinite if g_reactor_state is SPDK_REACTOR_STATE_RUNNING. Factor out the main polling loop and rusage update in _spdk_reactor_run() into a helper function reactor_run(). This improves the code readability as well. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ia26db14f44026fefd696443227c16d2be4166832 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1186 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Paul Luse <paul.e.luse@intel.com>