summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoropen-iscsi <open-iscsi@d7303112-9cec-0310-bdd2-e83a94d6c2b6>2005-02-20 07:13:34 +0000
committeropen-iscsi <open-iscsi@d7303112-9cec-0310-bdd2-e83a94d6c2b6>2005-02-20 07:13:34 +0000
commitb1e1694a2923cb2191cfd3ebf0a0750f9864f533 (patch)
treefdeba0b21b56944e29b134c7f99ae325109b4dfb /test
parent3645ff01cb45d2cbdaa50d540b08b2fe298251de (diff)
downloadopen-iscsi-b1e1694a2923cb2191cfd3ebf0a0750f9864f533.tar.gz
regression test work, README
git-svn-id: svn://svn.berlios.de/open-iscsi@93 d7303112-9cec-0310-bdd2-e83a94d6c2b6
Diffstat (limited to 'test')
-rw-r--r--test/README7
-rw-r--r--test/regression.dat20
-rwxr-xr-xtest/regression.sh65
3 files changed, 44 insertions, 48 deletions
diff --git a/test/README b/test/README
new file mode 100644
index 0000000..6eb699b
--- /dev/null
+++ b/test/README
@@ -0,0 +1,7 @@
+This directory contains regression suite.
+
+I would appreciate if developer will run it at least once after
+modifications done before commit or mailing list submit.
+
+Thanks!
+Dmitry
diff --git a/test/regression.dat b/test/regression.dat
index 15cf282..766835a 100644
--- a/test/regression.dat
+++ b/test/regression.dat
@@ -1,10 +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
+#imdata inir2t hdrdgst frstbst mxbrst mxrecv mxr2t
+Yes No None 4096 4096 8192 1
+Yes No None 8192 4096 8192 1
+Yes No None 16384 4096 8192 1
+Yes No None 32768 4096 8192 1
+Yes No None 65536 4096 8192 1
+Yes No None 4096 8192 8192 1
+Yes No None 4096 16384 8192 1
+Yes No None 4096 32786 8192 1
+Yes No None 4096 65536 8192 1
diff --git a/test/regression.sh b/test/regression.sh
index 066490b..c59dd2e 100755
--- a/test/regression.sh
+++ b/test/regression.sh
@@ -1,8 +1,8 @@
#!/bin/bash
#
-# iSCSI Regression Test Utility
-# Copyright (C) 2004 Dmitry Yusupov, Alex Aizman
-# maintained by open-iscsi@@googlegroups.com
+# Open-iSCSI Regression Test Utility
+# Copyright (C) 2004 Dmitry Yusupov
+# 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
@@ -19,28 +19,19 @@
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 update_cfg() {
+./iscsiadm -m node -r $record -o update \
+ -n node.session.iscsi.ImmediateData -v $imm_data_en
+./iscsiadm -m node -r $record -o update \
+ -n node.session.iscsi.InitialR2T -v $initial_r2t_en
+./iscsiadm -m node -r $record -o update \
+ -n node.cnx[0].iscsi.HeaderDigest -v $hdrdgst_en
+./iscsiadm -m node -r $record -o update \
+ -n node.session.iscsi.FirstBurstLength -v $first_burst
+./iscsiadm -m node -r $record -o update \
+ -n node.session.iscsi.MaxBurstLength -v $max_burst
+./iscsiadm -m node -r $record -o update \
+ -n node.cnx[0].iscsi.MaxRecvDataSegmentLength -v $max_recv_dlength
}
function disktest_run() {
@@ -72,9 +63,9 @@ 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#]"
+ Usage: regression.sh <node record> [test#]"
-portal=$1
+record=$1
test x$2 != x && begin=$2
i=0
@@ -85,25 +76,23 @@ cat regression.dat | while read line; do
continue
fi
fi
- imm_data_en=`echo $line | awk '/^[0-9]/ {print $1}'`
+ imm_data_en=`echo $line | awk '/^[YesNo]+/ {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
+ initial_r2t_en=`echo $line | awk '{print $2}'`
+ hdrdgst_en=`echo $line | awk '{print $3}'`
+ first_burst=`echo $line | awk '{print $4}'`
+ max_burst=`echo $line | awk '{print $5}'`
+ max_recv_dlength=`echo $line | awk '{print $6}'`
+ max_r2t=`echo $line | awk '{print $7}'`
+ update_cfg
echo "================== TEST #$i BEGIN ===================="
echo "imm_data_en = $imm_data_en"
echo "initial_r2t_en = $initial_r2t_en"
+ echo "hdrdgst_en = $hdrdgst_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