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 <james.r.harris@intel.com> Change-Id: Id6841e71d7842117756346cfd0fe1853a1ea5c6a
This commit is contained in:
parent
438064c925
commit
fae782b66f
@ -18,6 +18,10 @@ if [ -z "$INITIATOR_IP" ]; then
|
|||||||
echo "INITIATOR_IP not defined - using 127.0.0.1"
|
echo "INITIATOR_IP not defined - using 127.0.0.1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$ISCSI_APP" ]; then
|
||||||
|
ISCSI_APP=./app/iscsi_tgt/iscsi_tgt
|
||||||
|
fi
|
||||||
|
|
||||||
timing_enter ext4test
|
timing_enter ext4test
|
||||||
|
|
||||||
# iSCSI target configuration
|
# iSCSI target configuration
|
||||||
@ -29,7 +33,7 @@ NETMASK=$INITIATOR_IP/32
|
|||||||
|
|
||||||
rpc_py="python $rootdir/scripts/rpc.py"
|
rpc_py="python $rootdir/scripts/rpc.py"
|
||||||
|
|
||||||
./app/iscsi_tgt/iscsi_tgt -c $testdir/iscsi.conf &
|
$ISCSI_APP -c $testdir/iscsi.conf &
|
||||||
pid=$!
|
pid=$!
|
||||||
echo "Process pid: $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
|
# "1:2" ==> map PortalGroup1 to InitiatorGroup2
|
||||||
# "64" ==> iSCSI queue depth 64
|
# "64" ==> iSCSI queue depth 64
|
||||||
# "1 0 0 0" ==> disable CHAP authentication
|
# "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
|
$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
|
$rpc_py construct_target_node Target1 Target1_alias Malloc0:0 1:2 64 1 0 0 0
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
Reference in New Issue
Block a user