From 8ef4dc8f3a8c34ea6ee8fea30d8d9dd79b27a0b9 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 9 Oct 2016 14:08:38 -0700 Subject: [PATCH] Add tests for sending/receiving each opcode end-to-end using iscsi-test-cu Signed-off-by: Ronnie Sahlberg --- tests/functions.sh | 6 +++++- tests/test_9000_compareandwrite.sh | 17 +++++++++++++++++ tests/test_9001_extendedcopy.sh | 17 +++++++++++++++++ tests/test_9002_getlbatatus.sh | 17 +++++++++++++++++ tests/test_9003_inquiry.sh | 17 +++++++++++++++++ tests/test_9004_modesense6.sh | 18 ++++++++++++++++++ tests/test_9005_orwrite.sh | 17 +++++++++++++++++ tests/test_9006_prefetch10.sh | 17 +++++++++++++++++ tests/test_9007_prefetch16.sh | 17 +++++++++++++++++ tests/test_9008_prinreadkeys.sh | 17 +++++++++++++++++ tests/test_9009_read6.sh | 17 +++++++++++++++++ tests/test_9010_read10.sh | 17 +++++++++++++++++ tests/test_9011_read12.sh | 17 +++++++++++++++++ tests/test_9012_read16.sh | 17 +++++++++++++++++ tests/test_9013_verify10.sh | 17 +++++++++++++++++ tests/test_9014_verify12.sh | 17 +++++++++++++++++ tests/test_9015_verify16.sh | 17 +++++++++++++++++ tests/test_9016_write10.sh | 17 +++++++++++++++++ tests/test_9017_write12.sh | 17 +++++++++++++++++ tests/test_9018_write16.sh | 17 +++++++++++++++++ tests/test_9019_writeverify10.sh | 17 +++++++++++++++++ tests/test_9020_writeverify12.sh | 17 +++++++++++++++++ tests/test_9021_writeverify16.sh | 17 +++++++++++++++++ tests/test_9022_testunitready.sh | 17 +++++++++++++++++ tests/test_9023_readcapacity10.sh | 17 +++++++++++++++++ tests/test_9024_readcapacity16.sh | 17 +++++++++++++++++ tests/test_9025_receivecopyresults.sh | 17 +++++++++++++++++ tests/test_9026_reportsupportedopcodes.sh | 17 +++++++++++++++++ tests/test_9027_unmap.sh | 17 +++++++++++++++++ tests/test_9028_readdefectdata10.sh | 17 +++++++++++++++++ tests/test_9029_readdefectdata12.sh | 17 +++++++++++++++++ tests/test_9030_prinreportcapabilities.sh | 17 +++++++++++++++++ tests/test_9031_proutregister.sh | 17 +++++++++++++++++ tests/test_9032_proutclear.sh | 17 +++++++++++++++++ tests/test_9033_proutpreempt.sh | 17 +++++++++++++++++ tests/test_9034_startstopunit.sh | 17 +++++++++++++++++ tests/test_9035_startstopunit_removable.sh | 18 ++++++++++++++++++ 37 files changed, 619 insertions(+), 1 deletion(-) mode change 100644 => 100755 tests/functions.sh create mode 100755 tests/test_9000_compareandwrite.sh create mode 100755 tests/test_9001_extendedcopy.sh create mode 100755 tests/test_9002_getlbatatus.sh create mode 100755 tests/test_9003_inquiry.sh create mode 100755 tests/test_9004_modesense6.sh create mode 100755 tests/test_9005_orwrite.sh create mode 100755 tests/test_9006_prefetch10.sh create mode 100755 tests/test_9007_prefetch16.sh create mode 100755 tests/test_9008_prinreadkeys.sh create mode 100755 tests/test_9009_read6.sh create mode 100755 tests/test_9010_read10.sh create mode 100755 tests/test_9011_read12.sh create mode 100755 tests/test_9012_read16.sh create mode 100755 tests/test_9013_verify10.sh create mode 100755 tests/test_9014_verify12.sh create mode 100755 tests/test_9015_verify16.sh create mode 100755 tests/test_9016_write10.sh create mode 100755 tests/test_9017_write12.sh create mode 100755 tests/test_9018_write16.sh create mode 100755 tests/test_9019_writeverify10.sh create mode 100755 tests/test_9020_writeverify12.sh create mode 100755 tests/test_9021_writeverify16.sh create mode 100755 tests/test_9022_testunitready.sh create mode 100755 tests/test_9023_readcapacity10.sh create mode 100755 tests/test_9024_readcapacity16.sh create mode 100755 tests/test_9025_receivecopyresults.sh create mode 100755 tests/test_9026_reportsupportedopcodes.sh create mode 100755 tests/test_9027_unmap.sh create mode 100755 tests/test_9028_readdefectdata10.sh create mode 100755 tests/test_9029_readdefectdata12.sh create mode 100755 tests/test_9030_prinreportcapabilities.sh create mode 100755 tests/test_9031_proutregister.sh create mode 100755 tests/test_9032_proutclear.sh create mode 100755 tests/test_9033_proutpreempt.sh create mode 100755 tests/test_9034_startstopunit.sh create mode 100755 tests/test_9035_startstopunit_removable.sh diff --git a/tests/functions.sh b/tests/functions.sh old mode 100644 new mode 100755 index 09162f5..34adbe8 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -19,7 +19,6 @@ start_target() { sleep 1 ${TGTADM} --op new --mode target --tid 1 -T ${IQNTARGET} ${TGTADM} --op bind --mode target --tid 1 -I ALL - #${TGTADM} --op show --mode target } shutdown_target() { @@ -33,6 +32,7 @@ create_lun() { # Setup LUN truncate --size=100M ${TGTLUN} ${TGTADM} --op new --mode logicalunit --tid 1 --lun 1 -b ${TGTLUN} --blocksize=4096 + ${TGTADM} --op update --mode logicalunit --tid 1 --lun 1 --params thin_provisioning=1 } delete_lun() { @@ -59,6 +59,10 @@ remove_disk_lun() { ${TGTADM} --op delete --mode logicalunit --tid 1 --lun $1 } +set_lun_removable() { + ${TGTADM} --op update --mode logicalunit --tid 1 --lun $1 --params removable=1 +} + setup_chap() { ${TGTADM} --op new --mode account --user libiscsi --password libiscsi ${TGTADM} --op bind --mode account --tid 1 --user libiscsi diff --git a/tests/test_9000_compareandwrite.sh b/tests/test_9000_compareandwrite.sh new file mode 100755 index 0000000..a2ab516 --- /dev/null +++ b/tests/test_9000_compareandwrite.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu CompareAndWrite test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.CompareAndWrite ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.CompareAndWrite.* --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9001_extendedcopy.sh b/tests/test_9001_extendedcopy.sh new file mode 100755 index 0000000..e7b6da0 --- /dev/null +++ b/tests/test_9001_extendedcopy.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ExtendedCopy test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ExtendedCopy ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ExtendedCopy.* --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9002_getlbatatus.sh b/tests/test_9002_getlbatatus.sh new file mode 100755 index 0000000..661f61d --- /dev/null +++ b/tests/test_9002_getlbatatus.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu GetLBAStatus test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.GetLBAStatus ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.GetLBAStatus.Simple --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9003_inquiry.sh b/tests/test_9003_inquiry.sh new file mode 100755 index 0000000..278b9ef --- /dev/null +++ b/tests/test_9003_inquiry.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Inquiry test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Inquiry ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Inquiry --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9004_modesense6.sh b/tests/test_9004_modesense6.sh new file mode 100755 index 0000000..6efc9af --- /dev/null +++ b/tests/test_9004_modesense6.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ModeSense6 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ModeSense6 ... " + +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ModeSense6 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9005_orwrite.sh b/tests/test_9005_orwrite.sh new file mode 100755 index 0000000..443306c --- /dev/null +++ b/tests/test_9005_orwrite.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu OrWrite test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.OrWrite ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.OrWrite.* --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9006_prefetch10.sh b/tests/test_9006_prefetch10.sh new file mode 100755 index 0000000..f2227d8 --- /dev/null +++ b/tests/test_9006_prefetch10.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Prefetch10 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Prefetch10 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Prefetch10.* --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9007_prefetch16.sh b/tests/test_9007_prefetch16.sh new file mode 100755 index 0000000..717f9ad --- /dev/null +++ b/tests/test_9007_prefetch16.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Prefetch16 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Prefetch16 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Prefetch16 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9008_prinreadkeys.sh b/tests/test_9008_prinreadkeys.sh new file mode 100755 index 0000000..0166d9e --- /dev/null +++ b/tests/test_9008_prinreadkeys.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu PrinReadKeys test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.PrinReadKeys ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.PrinReadKeys --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9009_read6.sh b/tests/test_9009_read6.sh new file mode 100755 index 0000000..932eca7 --- /dev/null +++ b/tests/test_9009_read6.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Read6 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Read6 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Read6 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9010_read10.sh b/tests/test_9010_read10.sh new file mode 100755 index 0000000..ad7344a --- /dev/null +++ b/tests/test_9010_read10.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Read10 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Read10 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Read10 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9011_read12.sh b/tests/test_9011_read12.sh new file mode 100755 index 0000000..f606679 --- /dev/null +++ b/tests/test_9011_read12.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Read12 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Read12 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Read12 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9012_read16.sh b/tests/test_9012_read16.sh new file mode 100755 index 0000000..f201c94 --- /dev/null +++ b/tests/test_9012_read16.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Read16 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Read16 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Read16 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9013_verify10.sh b/tests/test_9013_verify10.sh new file mode 100755 index 0000000..6391417 --- /dev/null +++ b/tests/test_9013_verify10.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Verify10 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Verify10 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Verify10 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9014_verify12.sh b/tests/test_9014_verify12.sh new file mode 100755 index 0000000..8fbec0c --- /dev/null +++ b/tests/test_9014_verify12.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Verify12 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Verify12 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Verify12 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9015_verify16.sh b/tests/test_9015_verify16.sh new file mode 100755 index 0000000..3d23b01 --- /dev/null +++ b/tests/test_9015_verify16.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Verify16 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Verify16 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Verify16 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9016_write10.sh b/tests/test_9016_write10.sh new file mode 100755 index 0000000..b6df941 --- /dev/null +++ b/tests/test_9016_write10.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Write10 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Write10 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Write10 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9017_write12.sh b/tests/test_9017_write12.sh new file mode 100755 index 0000000..503a071 --- /dev/null +++ b/tests/test_9017_write12.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Write12 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Write12 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Write12 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9018_write16.sh b/tests/test_9018_write16.sh new file mode 100755 index 0000000..f9fb638 --- /dev/null +++ b/tests/test_9018_write16.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Write16 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Write16 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Write16 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9019_writeverify10.sh b/tests/test_9019_writeverify10.sh new file mode 100755 index 0000000..0022822 --- /dev/null +++ b/tests/test_9019_writeverify10.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu WriteVerify16 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.WriteVerify16 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.WriteVerify16 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9020_writeverify12.sh b/tests/test_9020_writeverify12.sh new file mode 100755 index 0000000..ab8a8da --- /dev/null +++ b/tests/test_9020_writeverify12.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu WriteVerify12 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.WriteVerify12 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.WriteVerify12 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9021_writeverify16.sh b/tests/test_9021_writeverify16.sh new file mode 100755 index 0000000..0022822 --- /dev/null +++ b/tests/test_9021_writeverify16.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu WriteVerify16 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.WriteVerify16 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.WriteVerify16 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9022_testunitready.sh b/tests/test_9022_testunitready.sh new file mode 100755 index 0000000..5f203f3 --- /dev/null +++ b/tests/test_9022_testunitready.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu TestUnitReady test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.TestUnitReady ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.TestUnitReady --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9023_readcapacity10.sh b/tests/test_9023_readcapacity10.sh new file mode 100755 index 0000000..461b8d5 --- /dev/null +++ b/tests/test_9023_readcapacity10.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ReadCapacity10 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ReadCapacity10 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ReadCapacity10 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9024_readcapacity16.sh b/tests/test_9024_readcapacity16.sh new file mode 100755 index 0000000..836cde4 --- /dev/null +++ b/tests/test_9024_readcapacity16.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ReadCapacity16 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ReadCapacity16 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ReadCapacity16 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9025_receivecopyresults.sh b/tests/test_9025_receivecopyresults.sh new file mode 100755 index 0000000..634e7f4 --- /dev/null +++ b/tests/test_9025_receivecopyresults.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ReceiveCopyResults test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ReceiveCopyResults ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ReceiveCopyResults --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9026_reportsupportedopcodes.sh b/tests/test_9026_reportsupportedopcodes.sh new file mode 100755 index 0000000..1e28043 --- /dev/null +++ b/tests/test_9026_reportsupportedopcodes.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ReportSupportedOpcodes test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ReportSupportedOpcodes ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ReportSupportedOpcodes --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9027_unmap.sh b/tests/test_9027_unmap.sh new file mode 100755 index 0000000..bfcba19 --- /dev/null +++ b/tests/test_9027_unmap.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu Unmap test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.Unmap ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.Unmap --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9028_readdefectdata10.sh b/tests/test_9028_readdefectdata10.sh new file mode 100755 index 0000000..1bd8e62 --- /dev/null +++ b/tests/test_9028_readdefectdata10.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ReadDefectData10 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ReadDefectData10 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ReadDefectData10 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9029_readdefectdata12.sh b/tests/test_9029_readdefectdata12.sh new file mode 100755 index 0000000..53ab1ea --- /dev/null +++ b/tests/test_9029_readdefectdata12.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ReadDefectData12 test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ReadDefectData12 ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ReadDefectData12 --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9030_prinreportcapabilities.sh b/tests/test_9030_prinreportcapabilities.sh new file mode 100755 index 0000000..bb748c8 --- /dev/null +++ b/tests/test_9030_prinreportcapabilities.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu PrinReportCapabilities test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.PrinReportCapabilities ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.PrinReportCapabilities --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9031_proutregister.sh b/tests/test_9031_proutregister.sh new file mode 100755 index 0000000..960262b --- /dev/null +++ b/tests/test_9031_proutregister.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ProutRegister test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ProutRegister ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ProutRegister --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9032_proutclear.sh b/tests/test_9032_proutclear.sh new file mode 100755 index 0000000..5730e33 --- /dev/null +++ b/tests/test_9032_proutclear.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ProutClear test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ProutClear ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ProutClear --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9033_proutpreempt.sh b/tests/test_9033_proutpreempt.sh new file mode 100755 index 0000000..c489e49 --- /dev/null +++ b/tests/test_9033_proutpreempt.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu ProutPreempt test" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.ProutPreempt ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.ProutPreempt --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9034_startstopunit.sh b/tests/test_9034_startstopunit.sh new file mode 100755 index 0000000..0b84c3d --- /dev/null +++ b/tests/test_9034_startstopunit.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu StartStopUnit test for fixed media" + +start_target +create_disk_lun 1 100M + +echo -n "SCSI.StartStopUnit ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.StartStopUnit --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0 diff --git a/tests/test_9035_startstopunit_removable.sh b/tests/test_9035_startstopunit_removable.sh new file mode 100755 index 0000000..4a7df5d --- /dev/null +++ b/tests/test_9035_startstopunit_removable.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +. ./functions.sh + +echo "iscsi-test-cu StartStopUnit test for removable media" + +start_target +create_disk_lun 1 100M +set_lun_removable 1 + +echo -n "SCSI.StartStopUnit ... " +../test-tool/iscsi-test-cu -i ${IQNINITIATOR} iscsi://${TGTPORTAL}/${IQNTARGET}/1 -t SCSI.StartStopUnit --dataloss > /dev/null || failure +success + +shutdown_target +delete_disk_lun 1 + +exit 0