Commit 9ff6da99 authored by Ben Walker's avatar Ben Walker
Browse files

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: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/433360


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 76a7517c
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -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 &