Commit 0fa85da9 authored by Jim Harris's avatar Jim Harris
Browse files

test: wait_for_examine and delay in reap_unregistered_poller.sh



We need to give the thread library some time to reap
the unregistered poller - it is a bit of a delayed
process.  We have to wait for examine to finish on
the aio bdev, then the poll group gets destroyed and
the pollers unregistered.  This marks the pollers as
UNREGISTERED, but they aren't actually reaped until
next time the thread is polled.

Fixes issue #2980.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I1e32c50ea9b28ea2d5560ddc9b2f68fa81e708d9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17575


Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMike Gerdts <mgerdts@nvidia.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 72672d49
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -8,6 +8,9 @@ rootdir=$(readlink -f $testdir/../..)
source $rootdir/test/common/autotest_common.sh
source $testdir/interrupt_common.sh

# This test script makes sure that unregistered pollers are
# reaped correctly when the target is running in interrupt mode.

export PYTHONPATH=$PYTHONPATH:$rootdir/examples/interrupt_tgt

# Set reactors with intr_tgt in intr mode
@@ -24,6 +27,12 @@ native_pollers+=$(jq -r '.timed_pollers[].name' <<< $app_thread)
# pollers like bdev_aio_group_poll poller, and then unregister it.
setup_bdev_aio

# Wait for examine to finish, and then sleep a very short amount of
# time to allow the unregistered pollers to get reaped next time
# the spdk_threads are polled
"$rpc_py" bdev_wait_for_examine
sleep 0.1

# Record names of remaining pollers.
app_thread=$(rpc_cmd thread_get_pollers | jq -r '.threads[0]')
remaining_pollers=$(jq -r '.active_pollers[].name' <<< $app_thread)