mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 06:06:23 +00:00
scstadmin: Make regression test 6 pass
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6713 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -41,13 +41,15 @@ sub testRestoreConfig {
|
||||
"scstadmin-test-06-$$-1");
|
||||
my $tmpfilename2 = File::Spec->catfile(File::Spec->tmpdir(),
|
||||
"scstadmin-test-06-$$-2");
|
||||
my $diff = File::Spec->catfile(File::Spec->tmpdir(),
|
||||
"scstadmin-test-06-$$-diff");
|
||||
|
||||
system("$scstadmin -clear_config -force -noprompt -no_lip >/dev/null");
|
||||
system("$scstadmin -cont_on_err -no_lip -config $to_be_restored" .
|
||||
" >/dev/null");
|
||||
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");
|
||||
my $compare_result = system("diff -u $tmpfilename2 $expected");
|
||||
my $compare_result = system("diff -u $tmpfilename2 $expected >$diff");
|
||||
ok($compare_result, 0);
|
||||
if ($compare_result == 0) {
|
||||
unlink($tmpfilename2);
|
||||
|
||||
@@ -14,6 +14,11 @@ TARGET_DRIVER scst_local {
|
||||
LUN 0 disk01
|
||||
LUN 1 disk01
|
||||
|
||||
GROUP group_without_luns_with_attrs {
|
||||
|
||||
addr_method FLAT
|
||||
}
|
||||
|
||||
GROUP initiator_group {
|
||||
LUN 0 disk01
|
||||
LUN 1 disk01 {
|
||||
@@ -27,11 +32,6 @@ TARGET_DRIVER scst_local {
|
||||
|
||||
INITIATOR ini3
|
||||
}
|
||||
|
||||
GROUP group_without_luns_with_attrs {
|
||||
|
||||
addr_method FLAT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user