From b2f55b42d3ed8bdfe8c32d5b5b7103231478f3f0 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Tue, 3 Aug 2010 22:53:06 +0000 Subject: [PATCH] some minor edits to accounting tests --- testsuite/expect/README | 3 +- testsuite/expect/test21.28 | 55 +++++++++--------- testsuite/expect/test21.29 | 111 ++++++++++++++++++------------------- testsuite/expect/test21.6 | 4 +- testsuite/expect/test21.7 | 4 +- testsuite/expect/test21.8 | 6 +- testsuite/expect/test21.9 | 6 +- 7 files changed, 94 insertions(+), 95 deletions(-) diff --git a/testsuite/expect/README b/testsuite/expect/README index f7eb0fa3ead..9e86497f70d 100644 --- a/testsuite/expect/README +++ b/testsuite/expect/README @@ -538,7 +538,8 @@ test21.24 sacctmgr dump file test21.25 sacctmgr show config test21.26 sacctmgr +=, -= modify QoS test test21.27 sacctmgr problems test -test21.25 sacctmgr abort delete +test21.28 sacctmgr abort delete +test21.29 sacctmgr clear (modify) QoS values test22.# Testing of sreport commands and options. These also test the sacctmgr archive dump/load functions. diff --git a/testsuite/expect/test21.28 b/testsuite/expect/test21.28 index 4f777f20459..00b6a000a25 100755 --- a/testsuite/expect/test21.28 +++ b/testsuite/expect/test21.28 @@ -160,8 +160,8 @@ if { $exit_code } { # ################################################################ proc list_test_users { } { - global sacctmgr - global us1 us2 us3 nm1 nm2 nm3 tc1 tc2 tc3 fs1 mc1 mj1 mn1 mw1 alo + global sacctmgr + global us1 us2 us3 nm1 nm2 nm3 tc1 tc2 tc3 fs1 mc1 mj1 mn1 mw1 alo set matches 0 set my_pid [spawn $sacctmgr -n -p list user format="User,DefaultA,Admin,clus,acc,fair,maxcpum,maxj,maxn,maxw" names=$us1,$us2,$us3 withassoc] expect { @@ -196,7 +196,7 @@ proc list_test_users { } { # ################################################################ proc list_test_object { to1 to2 to3 tname} { - global sacctmgr + global sacctmgr set tmatches 0 set my_pid [spawn $sacctmgr -n -p list $tname $to1,$to2,$to3] expect { @@ -226,16 +226,16 @@ foreach atest $lista { set my_pid [spawn $sacctmgr del $acc $atest] expect { "(N/y):" { - send "N\r" + send "N" exp_continue timeout { send_user "\nFAILURE: sacctmgr list $acc timing out.\n" slow_kill $my_pid } - } - } + } + } } - + if { [list_test_users] != 27 } { send_user "\nFAILURE: This test$test_id concludes that sacctmgr did not abort delete of accounts.\n" @@ -247,16 +247,16 @@ foreach ctest $listc { set my_pid [spawn $sacctmgr del $clu $ctest] expect { "(N/y):" { - send "N\r" + send "N" exp_continue timeout { send_user "\nFAILURE: sacctmgr list cluster timing out.\n" slow_kill $my_pid } - } - } + } + } } - + if { [list_test_users] != 27 } { send_user "\nFAILURE: This test$test_id concludes that sacctmgr did not abort delete of $clu\n" @@ -268,16 +268,16 @@ foreach utest $listu { set my_pid [spawn $sacctmgr del $usr $atest] expect { "(N/y):" { - send "N\r" + send "N" exp_continue timeout { send_user "\nFAILURE: sacctmgr list $usr timing out.\n" slow_kill $my_pid } - } - } + } + } } - + if { [list_test_users] != 27 } { send_user "\nFAILURE: This test$test_id concludes that sacctmgr did not abort delete of users.\n" @@ -293,14 +293,14 @@ foreach udtest $listu { set my_pid [spawn $sacctmgr del $usr $udtest] expect { "(N/y):" { - send "y\r" + send "y" exp_continue timeout { send_user "\nFAILURE: sacctmgr list $usr timing out.\n" slow_kill $my_pid } - } - } + } + } } if { [list_test_object $us1 $us2 $us3 user] != 0 } { @@ -314,16 +314,16 @@ foreach adtest $lista { set my_pid [spawn $sacctmgr del $acc $adtest] expect { "(N/y):" { - send "y\r" + send "y" exp_continue timeout { send_user "\nFAILURE: sacctmgr list $acc timing out.\n" slow_kill $my_pid } - } - } + } + } } - + if { [list_test_object $nm1 $nm2 $nm3 account] != 0 } { send_user "\nFAILURE: This test$test_id concludes that sacctmgr did not delete accounts.\n" @@ -335,16 +335,16 @@ foreach cdtest $listc { set my_pid [spawn $sacctmgr del $clu $cdtest] expect { "(N/y):" { - send "y/r" - exp_continue + send "y" + exp_continue timeout { send_user "\nFAILURE: sacctmgr list cluster timing out.\n" slow_kill $my_pid } - } - } + } + } } - + if { [list_test_object $tc1 $tc2 $tc3 cluster] != 0 } { send_user "\nFAILURE: This test$test_id concludes that sacctmgr did not delete $clu\n" @@ -363,4 +363,3 @@ if {$exit_code == 0} { send_user "\nFAILURE\n" } exit $exit_code - diff --git a/testsuite/expect/test21.29 b/testsuite/expect/test21.29 index 7630653f863..b270ce22d04 100755 --- a/testsuite/expect/test21.29 +++ b/testsuite/expect/test21.29 @@ -35,48 +35,48 @@ source ./globals_accounting set test_id "test21.29" set exit_code 0 -set nm name -set qs QOS -set qs1 tnormal -set rs -1 -set dsc description -set ds1 tqos1 -set gc GrpCpus -set gc1 80 -set gcm GrpCpuMins -set gcm1 240000 -set gj GrpJobs -set gj1 500 -set gn GrpNodes -set gn1 10 -set gs GrpSubmit -set gs1 800 -set gw GrpWall -set gw1 01:00:00 -set mc MaxCpus -set mc1 80 -set mcm MaxCpuMins -set mcm1 60000 -set mj MaxJobs -set mj1 50 -set mn MaxNodes -set mn1 2 -set ms MaxSubmit -set ms1 100 -set msj MaxSubmitJobs -set msj1 100 -set mw Maxwall -set mw1 01:00:00 -set pre Preempt -set pe1 normal -set pm PreemptMode -set pm1 cluster -set pri Priority -set pi1 2500 -set pi3 0 -set uf UsageFactor -set uf1 5.000000 -set uf3 1.000000 +set nm name +set qs QOS +set qs1 tnormal +set rs -1 +set dsc description +set ds1 tqos1 +set gc GrpCpus +set gc1 80 +set gcm GrpCpuMins +set gcm1 240000 +set gj GrpJobs +set gj1 500 +set gn GrpNodes +set gn1 10 +set gs GrpSubmit +set gs1 800 +set gw GrpWall +set gw1 01:00:00 +set mc MaxCpus +set mc1 80 +set mcm MaxCpuMins +set mcm1 60000 +set mj MaxJobs +set mj1 50 +set mn MaxNodes +set mn1 2 +set ms MaxSubmit +set ms1 100 +set msj MaxSubmitJobs +set msj1 100 +set mw Maxwall +set mw1 01:00:00 +set pre Preempt +set pe1 normal +set pm PreemptMode +set pm1 cluster +set pri Priority +set pi1 2500 +set pi3 0 +set uf UsageFactor +set uf1 5.000000 +set uf3 1.000000 set access_err 0 print_header $test_id @@ -112,19 +112,19 @@ set matches 0 set my_pid [spawn $sacctmgr -n -p list qos $qs1 format="$gc,$gcm,$gj,$gn,$gs,$gw,$mc,$mcm,$mj,$mn,$ms,$msj,$mw,$pre,$pm,$pri,$uf" ] expect { -re "No valid entity in list command" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "invalid keyword" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "Unknown condition" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "Unknown field" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "($gc1.$gcm1.$gj1.$gn1.$gs1.01.00.00.$mc1.$mcm1.$mj1.$mn1.$ms1.$msj1.01.00.00.$pe1.$pm1.$pi1.$uf1)" { @@ -153,23 +153,23 @@ set matches 0 set my_pid [eval spawn $sacctmgr -i mod qos where $nm=$qs1 set $gc=$rs $gcm=$rs $gj=$rs $gn=$rs $gs=$rs $gw=$rs $mc=$rs $mcm=$rs $mj=$rs $mn=$rs $ms=$rs $msj=$rs $mw=$rs $pri=$rs $uf=$rs] expect { -re "No valid entity in list command" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "invalid keyword" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "Unknown condition" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "Nothing modified" { - send_user "FAILURE: sacctmgr command unable to modify\n" + send_user "FAILURE: sacctmgr command unable to modify\n" incr exit_code 1 } -re "Unknown field" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "Modified qos" { @@ -201,19 +201,19 @@ set matches 0 set my_pid [spawn $sacctmgr -n -p list qos $qs1 format="$gc,$gcm,$gj,$gn,$gs,$gw,$mc,$mcm,$mj,$mn,$ms,$msj,$mw,$pre,$pm,$pri,$uf" ] expect { -re "No valid entity in list command" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "invalid keyword" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "Unknown condition" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "Unknown field" { - send_user "FAILURE: there was a problem with the sacctmgr command\n" + send_user "FAILURE: there was a problem with the sacctmgr command\n" incr exit_code 1 } -re "(.............$pe1.$pm1.$pi3.$uf3)" { @@ -247,4 +247,3 @@ if {$exit_code == 0} { send_user "\nFAILURE\n" } exit $exit_code - diff --git a/testsuite/expect/test21.6 b/testsuite/expect/test21.6 index 4e5ad5b2568..e63d1842dbb 100755 --- a/testsuite/expect/test21.6 +++ b/testsuite/expect/test21.6 @@ -231,7 +231,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr amatches - send "Y\r" + send "Y" exp_continue } timeout { @@ -275,7 +275,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr dmatches - send "Y\r" + send "Y" exp_continue } timeout { diff --git a/testsuite/expect/test21.7 b/testsuite/expect/test21.7 index 5e5f4fb106d..955fdd26041 100755 --- a/testsuite/expect/test21.7 +++ b/testsuite/expect/test21.7 @@ -169,7 +169,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr amatches - send "Y\r" + send "Y" exp_continue } timeout { @@ -256,7 +256,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr dmatches - send "Y\r" + send "Y" exp_continue } timeout { diff --git a/testsuite/expect/test21.8 b/testsuite/expect/test21.8 index 67312d4f0d4..8a0aa1c0d77 100755 --- a/testsuite/expect/test21.8 +++ b/testsuite/expect/test21.8 @@ -181,7 +181,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr amatches - send "Y\r" + send "Y" exp_continue } timeout { @@ -271,7 +271,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr mmatches - send "Y\r" + send "Y" exp_continue } timeout { @@ -355,7 +355,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr dmatches - send "Y\r" + send "Y" exp_continue } timeout { diff --git a/testsuite/expect/test21.9 b/testsuite/expect/test21.9 index 461ebc19608..0eab41c1e3b 100755 --- a/testsuite/expect/test21.9 +++ b/testsuite/expect/test21.9 @@ -181,7 +181,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr amatches - send "Y\r" + send "Y" exp_continue } timeout { @@ -271,7 +271,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr mmatches - send "Y\r" + send "Y" exp_continue } timeout { @@ -355,7 +355,7 @@ expect { } -re "\\\(N\\\/y\\\):" { incr dmatches - send "Y\r" + send "Y" exp_continue } timeout { -- GitLab