Add tests for sending/receiving each opcode end-to-end using iscsi-test-cu

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2016-10-09 14:08:38 -07:00
parent 4d0c7559c0
commit 8ef4dc8f3a
37 changed files with 619 additions and 1 deletions

6
tests/functions.sh Normal file → Executable file
View File

@@ -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