nvmf: Update shutdown test to use wait_for_subsystems RPC
This makes it correctly wait until the bdevperf test has started running prior to starting the sleep to allow I/O to begin. Change-Id: Ia6c004ede1854e836479dd3a0707a91551f954bc Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/433359 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
9a6fe60faa
commit
f64bc0d10c
@ -62,9 +62,13 @@ done
|
||||
# Test 1: Kill initiator unexpectedly
|
||||
|
||||
# Run bdevperf
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 20 &
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 &
|
||||
perfpid=$!
|
||||
sleep 10
|
||||
waitforlisten $perfpid /var/tmp/bdevperf.sock
|
||||
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
|
||||
|
||||
# Sleep for a few seconds to allow I/O to begin
|
||||
sleep 5
|
||||
|
||||
# Kill bdevperf half way through
|
||||
killprocess $perfpid
|
||||
@ -76,14 +80,18 @@ kill -0 $pid
|
||||
# Test 2: Kill the target unexpectedly
|
||||
|
||||
# Run bdevperf
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 20 &
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -i 0 -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 &
|
||||
perfpid=$!
|
||||
waitforlisten $perfpid /var/tmp/bdevperf.sock
|
||||
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
|
||||
|
||||
# Expand the trap to clean up bdevperf if something goes wrong
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $pid; kill -9 $perfpid; nvmfcleanup; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
# Sleep for a few seconds to allow I/O to begin
|
||||
sleep 5
|
||||
|
||||
# Kill the target half way through
|
||||
sleep 10
|
||||
killprocess $pid
|
||||
|
||||
# Verify bdevperf exits successfully
|
||||
|
Loading…
Reference in New Issue
Block a user