nvmf: Add test that kills initiator with no I/O outstanding
This is a more difficult case to handle than killing with I/O outstanding because the target gets no notification that the connection went away. Effectively, this tests that keep alive is working correctly. Change-Id: I5bccea8bc51de6d1d2d40c2648ad7c40cce2c281 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/433360 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
76a7517caa
commit
9ff6da9961
@ -59,7 +59,26 @@ do
|
||||
echo " TransportID \"trtype:RDMA adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode$i traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT\" Nvme$i" >> $testdir/bdevperf.conf
|
||||
done
|
||||
|
||||
# Test 1: Kill initiator unexpectedly
|
||||
# Test 1: Kill the initiator unexpectedly with no I/O outstanding
|
||||
|
||||
# Run bdev_svc, which connects but does not issue I/O
|
||||
$rootdir/test/app/bdev_svc/bdev_svc -i 1 -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf &
|
||||
perfpid=$!
|
||||
waitforlisten $perfpid /var/tmp/bdevperf.sock
|
||||
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
|
||||
|
||||
# Kill bdev_svc
|
||||
kill -9 $perfpid
|
||||
rm -f /var/run/spdk_bdev1
|
||||
|
||||
# Verify the target stays up
|
||||
sleep 1
|
||||
kill -0 $pid
|
||||
|
||||
# Connect with bdevperf and confirm it works
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 1
|
||||
|
||||
# Test 2: Kill initiator unexpectedly with I/O outstanding
|
||||
|
||||
# Run bdevperf
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 &
|
||||
@ -77,7 +96,7 @@ killprocess $perfpid
|
||||
sleep 1
|
||||
kill -0 $pid
|
||||
|
||||
# Test 2: Kill the target unexpectedly
|
||||
# Test 3: Kill the target unexpectedly with I/O outstanding
|
||||
|
||||
# Run bdevperf
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -r /var/tmp/bdevperf.sock -c $testdir/bdevperf.conf -q 64 -o 65536 -w verify -t 10 &
|
||||
|
Loading…
Reference in New Issue
Block a user