mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scstadmin: Fix a few bugs in the regression test code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -25,7 +25,6 @@ if ($> == 0) {
|
||||
ok(system("modprobe scst_local add_default_tgt=0 && " .
|
||||
"modprobe iscsi-scst && " .
|
||||
"modprobe ib_srpt && " .
|
||||
"modprobe qla2x00tgt && " .
|
||||
"modprobe scst_vdisk && " .
|
||||
"iscsi-scstd"), 0);
|
||||
"../../../iscsi-scst/usr/iscsi-scstd"), 0);
|
||||
}
|
||||
|
||||
@@ -14,9 +14,7 @@ HANDLER vdisk_fileio {
|
||||
}
|
||||
|
||||
HANDLER vdisk_nullio {
|
||||
DEVICE nodev {
|
||||
dummy 1
|
||||
}
|
||||
DEVICE nodev
|
||||
}
|
||||
|
||||
TARGET_DRIVER scst_local {
|
||||
|
||||
@@ -68,7 +68,8 @@ sub attributeTest {
|
||||
system("$scstadmin -driver scst_local -target local -group ig " .
|
||||
"-add_lun 1 -device disk1 $redirect");
|
||||
system("$scstadmin -write_config $tmpfilename1 >/dev/null");
|
||||
system("awk 'BEGIN { t = 0 } /^# Automatically generated by SCST Configurator v/ { \$0 = \"# Automatically generated by SCST Configurator v...\" } /^TARGET_DRIVER.*{\$/ { if (\$0 != \"TARGET_DRIVER scst_local {\") t = 1 } /^}\$/ { if (t == 1) t = 2 } /^\$/ { if (t == 2) { t = 3 } } /^./ { if (t == 3) { t = 0 } } { if (t == 0) print }' <$tmpfilename1 >$tmpfilename2");
|
||||
# Keep only the scst_local target driver information.
|
||||
system("awk 'BEGIN { t = 0 } /^# Automatically generated by SCST Configurator v/ { \$0 = \"# Automatically generated by SCST Configurator v...\" } /^TARGET_DRIVER.*{\$/ { if (match(\$0, \"TARGET_DRIVER ([^ ]*) {\", d) && d[1] != \"scst_local\") t = 1 } /^}\$/ { if (t == 1) t = 2 } /^\$/ { if (t == 2) { t = 3 } } /^./ { if (t == 3) { t = 0 } } { if (t == 0) print }' <$tmpfilename1 >$tmpfilename2");
|
||||
my $compare_result = system("diff -u $tmpfilename2 $expected >$diff");
|
||||
ok($compare_result, 0);
|
||||
if ($compare_result == 0) {
|
||||
|
||||
Reference in New Issue
Block a user