diff options
author | open-iscsi <open-iscsi@d7303112-9cec-0310-bdd2-e83a94d6c2b6> | 2005-01-17 17:39:46 +0000 |
---|---|---|
committer | open-iscsi <open-iscsi@d7303112-9cec-0310-bdd2-e83a94d6c2b6> | 2005-01-17 17:39:46 +0000 |
commit | 4d501fa95e9c6f6f5938a09d25b9dac40b52d0e1 (patch) | |
tree | ad91e63b54b8dfb14cd37af17bcbcf05b8004ce4 /test | |
parent | 6f140d05e46a4706d8cddf87d94ecd97e0ea1d8f (diff) | |
download | open-iscsi-4d501fa95e9c6f6f5938a09d25b9dac40b52d0e1.tar.gz |
redesign host. interim. commit
git-svn-id: svn://svn.berlios.de/open-iscsi@32 d7303112-9cec-0310-bdd2-e83a94d6c2b6
Diffstat (limited to 'test')
-rw-r--r-- | test/regression.dat | 10 | ||||
-rwxr-xr-x | test/regression.sh | 111 |
2 files changed, 121 insertions, 0 deletions
diff --git a/test/regression.dat b/test/regression.dat new file mode 100644 index 0000000..15cf282 --- /dev/null +++ b/test/regression.dat @@ -0,0 +1,10 @@ +#imdata inir2t frstbst mxbrst mxrecv mxr2t mxcnx +1 0 4096 4096 8192 1 1 +1 0 8192 4096 8192 1 1 +1 0 16384 4096 8192 1 1 +1 0 32768 4096 8192 1 1 +1 0 65536 4096 8192 1 1 +1 0 4096 8192 8192 1 1 +1 0 4096 16384 8192 1 1 +1 0 4096 32786 8192 1 1 +1 0 4096 65536 8192 1 1 diff --git a/test/regression.sh b/test/regression.sh new file mode 100755 index 0000000..066490b --- /dev/null +++ b/test/regression.sh @@ -0,0 +1,111 @@ +#!/bin/bash +# +# iSCSI Regression Test Utility +# Copyright (C) 2004 Dmitry Yusupov, Alex Aizman +# maintained by open-iscsi@@googlegroups.com +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# See the file COPYING included with this distribution for more details. +# + +PATH=$PATH:. + +function write_cfg() { +cat << EOF > iscsi.conf +initiator_name = iqn.com.dima +initiator_alias = dima-um +isid = '012345' +first_burst = $first_burst +max_recv_dlength = $max_recv_dlength +max_burst = $max_burst +max_r2t = $max_r2t +max_cnx = $max_cnx +erl = 0 +initial_r2t_en = $initial_r2t_en +imm_data_en = $imm_data_en +hdrdgst_en = 0 +datadgst_en = 0 +ifmarker_en = 0 +ofmarker_en = 0 +pdu_inorder_en = 1 +dataseq_inorder_en = 1 +time2wait = 5 +time2retain = 20 +EOF +} + +function disktest_run() { + for bs in 512 1024 2048 4096 8192 16384 32768 65536 131072 1000000; do + echo -n "disktest -T2 -K8 -B$bs -r -ID /dev/sda: " + if ! disktest -T2 -K8 -B$bs -r -ID /dev/sda >/dev/null; then + echo "FAILED" + return 1; + fi + echo "PASSED" + echo -n "disktest -T2 -K8 -B$bs -E16 -w -ID /dev/sda: " + if ! disktest -T2 -K8 -B$bs -E16 -w -ID /dev/sda >/dev/null;then + echo "FAILED" + return 1; + fi + echo "PASSED" + done + return 0; +} + +function fatal() { + echo "regression.sh: $1" + exit 1 +} + +############################ main ################################### + +test ! -e regression.dat && fatal "can not find regression.dat" +test ! -e disktest && fatal "can not find disktest" +test ! -e iscsiadm && fatal "can not find iscsiadm" +test x$1 = x && fatal "parameter error + Usage: regression.sh <ipaddr:port> [test#]" + +portal=$1 +test x$2 != x && begin=$2 + +i=0 +cat regression.dat | while read line; do + if test x$begin != x; then + if test x$begin != x$i; then + let i=i+1 + continue + fi + fi + imm_data_en=`echo $line | awk '/^[0-9]/ {print $1}'` + if test x$imm_data_en = x; then continue; fi + initial_r2t_en=`echo $line | awk '/^[0-9]/ {print $2}'` + first_burst=`echo $line | awk '/^[0-9]/ {print $3}'` + max_burst=`echo $line | awk '/^[0-9]/ {print $4}'` + max_recv_dlength=`echo $line | awk '/^[0-9]/ {print $5}'` + max_r2t=`echo $line | awk '/^[0-9]/ {print $6}'` + max_cnx=`echo $line | awk '/^[0-9]/ {print $7}'` + write_cfg + echo "================== TEST #$i BEGIN ====================" + echo "imm_data_en = $imm_data_en" + echo "initial_r2t_en = $initial_r2t_en" + echo "first_burst = $first_burst" + echo "max_burst = $max_burst" + echo "max_recv_dlength = $max_recv_dlength" + echo "max_r2t = $max_r2t" + echo "max_cnx = $max_cnx" + iscsiadm -f iscsi.conf -r1 + iscsiadm -f iscsi.conf -d $portal + if ! disktest_run; then break; fi + let i=i+1 +done +echo +echo "===================== THE END ========================" |