From fae782b66f6c6c4aa743faca1b4a9a2d4f18af24 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 23 Nov 2016 12:23:56 -0700 Subject: [PATCH] ext4test: add ISCSI_APP and NO_NVME parameters This allows this test script to be used with different iSCSI target binaries, as well as optionally turning off configuration of an NVMe-based target node. Signed-off-by: Jim Harris Change-Id: Id6841e71d7842117756346cfd0fe1853a1ea5c6a --- test/iscsi_tgt/ext4test/ext4test.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/iscsi_tgt/ext4test/ext4test.sh b/test/iscsi_tgt/ext4test/ext4test.sh index 9edf3d99a..7b4adcd39 100755 --- a/test/iscsi_tgt/ext4test/ext4test.sh +++ b/test/iscsi_tgt/ext4test/ext4test.sh @@ -18,6 +18,10 @@ if [ -z "$INITIATOR_IP" ]; then echo "INITIATOR_IP not defined - using 127.0.0.1" fi +if [ -z "$ISCSI_APP" ]; then + ISCSI_APP=./app/iscsi_tgt/iscsi_tgt +fi + timing_enter ext4test # iSCSI target configuration @@ -29,7 +33,7 @@ NETMASK=$INITIATOR_IP/32 rpc_py="python $rootdir/scripts/rpc.py" -./app/iscsi_tgt/iscsi_tgt -c $testdir/iscsi.conf & +$ISCSI_APP -c $testdir/iscsi.conf & pid=$! echo "Process pid: $pid" @@ -43,7 +47,9 @@ $rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK # "1:2" ==> map PortalGroup1 to InitiatorGroup2 # "64" ==> iSCSI queue depth 64 # "1 0 0 0" ==> disable CHAP authentication +if [ -z "$NO_NVME" ]; then $rpc_py construct_target_node Target0 Target0_alias Nvme0n1p0:0 1:2 64 1 0 0 0 +fi $rpc_py construct_target_node Target1 Target1_alias Malloc0:0 1:2 64 1 0 0 0 sleep 1