Skip to content
Snippets Groups Projects
Commit 86da5825 authored by Nathan Yee's avatar Nathan Yee Committed by Danny Auble
Browse files

Add new test21.30

parent ac7c76ab
No related branches found
No related tags found
No related merge requests found
......@@ -385,6 +385,7 @@ EXTRA_DIST = \
test21.27 \
test21.28 \
test21.29 \
test21.30 \
test22.1 \
test22.2 \
test23.1 \
......
......@@ -697,6 +697,7 @@ EXTRA_DIST = \
test21.27 \
test21.28 \
test21.29 \
test21.30 \
test22.1 \
test22.2 \
test23.1 \
......
......@@ -579,6 +579,7 @@ test21.26 sacctmgr +=, -= modify QoS test
test21.27 sacctmgr problems test
test21.28 sacctmgr abort delete
test21.29 sacctmgr clear (modify) QoS values
test21.30 sacctmgr test if the QoS values are enforced
test22.# Testing of sreport commands and options.
......
############################################################################
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the group nodes limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_1 {} {
#test GrpNode limit
global srun salloc acct bin_sleep jobmatch job_id1 job_id2 number
set jobmatch 0
spawn $salloc -N1 --account=$acct $srun $bin_sleep 10
expect {
-re "Granted job allocation ($number)" {
set job_id1 $expect_out(1,string)
send_user "\njob $job_id1 has been submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not reponding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc -N2 --account=$acct $srun $bin_sleep 10
expect {
-re "job ($number)" {
set job_id2 $expect_out(1,string)
send_user "\nJob $job_id2 is waiting for resources. This is expected.\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not reponding\n"
exit 1
}
eof {
wait
}
}
if {$jobmatch==0} {
send_user "\nFAILURE: jobs were not submitted\n"
exit 1
}
# checks the state of the job
check_state $job_id2
#cancels remaining jobs
cancel_job $job_id1
cancel_job $job_id2
}
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the GrpCpus limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_2 {} {
#test GrpCpus
global srun salloc acct bin_sleep jobmatch job_id1 job_id2 number exit_code
set jobmatch 0
spawn $salloc --account=$acct -n6 $srun $bin_sleep 5
expect {
-re "Granted job allocation ($number)" {
set job_id1 $expect_out(1,string)
send_user "\njob $job_id1 has been submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not reponding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n6 $srun $bin_sleep 5
expect {
-re "job ($number)" {
set job_id2 $expect_out(1,string)
send_user "\njob $job_id2 is waiting for resources. This is expected\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not reponding\n"
exit 1
}
eof {
wait
}
}
if {$jobmatch==0} {
send_user "\nFAILURE: jobs were not submitted\n"
set exit 1
}
# checks the state of the job
check_state $job_id2
# cancels remaining jobs
cancel_job $job_id1
cancel_job $job_id2
}
############################################################################
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the GrpJob limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_3 {} {
# test GrpJob limits
global salloc srun acct bin_sleep jobmatch job_id1 job_id2 job_id3 number exit_code
set jobmatch 0
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id1 $expect_out(1,string)
send_user "\njob $job_id1 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id2 $expect_out(1,string)
send_user "\njob $job_id2 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "job ($number)" {
set job_id3 $expect_out(1,string)
send_user "\nJob $job_id3 is waiting for resources. This is expected\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
if {$jobmatch==0} {
send_user "\nFAILURE: jobs were not submitted\n"
exit 1
}
#checks the job state
check_state $job_id3
# cancels the remaining jobs
cancel_job $job_id1
cancel_job $job_id2
cancel_job $job_id3
}
############################################################################
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the GrpSubmits limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_4 {} {
# test GrpSubmit
global salloc srun acct bin_sleep jobmatch job_id1 job_id2 job_id3 number exit_code
set jobmatch 0
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id1 $expect_out(1,string)
send_user "\njob $job_id1 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id2 $expect_out(1,string)
send_user "\njob $job_id2 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "error" {
set job_id3 $expect_out(1,string)
send_user "\nThis error is expected do not worry\n"
incr jobmatch
}
-re "Granted job allocation" {
send_user "\nThis should have failed but did not\n"
exit 1
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
if {$jobmatch==0} {
send_user "\nFAILURE: jobs were not submitted\n"
exit 1
}
# cancels the remaining jobs
cancel_job $job_id1
cancel_job $job_id2
cancel_job $job_id3
}
############################################################################
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the MaxCpu limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_5 {} {
#test MaxCpus limits
global salloc acct number srun job_id1 bin_sleep
spawn $salloc --account=$acct -n11 $srun $bin_sleep 2
expect {
-re "job ($number)" {
set job_id1 $expect_out(1,string)
send_user "\nThis is expected do not worry\n"
}
-re "Granted job allocation ($number)" {
send_user "\nFAILURE: This should have failed but did not\n"
exit 1
}
timeout {
send_user "\nFAILURE: salloc not responding\n"
exit 1
}
eof {
wait
}
}
# cancels remaining jobs
cancel_job $job_id1
}
############################################################################
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the MaxNodes limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_6 {} {
#test MaxNode limit
global salloc acct number srun job_id1 bin_sleep
spawn $salloc --account=$acct -N11 $srun $bin_sleep 2
expect {
-re "job ($number)" {
set job_id1 $expect_out(1,string)
send_user "\nThis is expected do not worry\n"
}
-re "Granted job allocation ($number)" {
send_user "\nFAILURE: This should have failed but did not\n"
exit 1
}
timeout {
send_user "\nFAILURE: salloc not responding\n"
exit 1
}
eof {
wait
}
}
# cancels remaining jobs
cancel_job $job_id1
}
############################################################################
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the MaxJobs limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_7 {} {
#test MaxJobs limit
global salloc srun acct bin_sleep jobmatch job_id1 job_id2 job_id3 number exit_code
set jobmatch 0
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id1 $expect_out(1,string)
send_user "\njob $job_id1 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id2 $expect_out(1,string)
send_user "\njob $job_id2 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "job ($number)" {
set job_id3 $expect_out(1,string)
send_user "\nThis error is expected do not worry\n"
incr jobmatch
}
-re "Granted job allocation" {
send_user "\nThis should have failed but did not\n"
exit 1
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
check_state $job_id3
if {$jobmatch==0} {
send_user "\nFAILURE: jobs were not submitted\n"
exit 1
}
# cancels the remaining jobs
cancel_job $job_id1
cancel_job $job_id2
cancel_job $job_id3
}
############################################################################
# Purpose: Test of SLURM functionality
# to be called from test21.30
# Tests if the MaxJobSubmit limit is enforced
#
#
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
proc inc21_30_8 {} {
#test MaxJobsSubmits limit
global salloc srun acct bin_sleep jobmatch job_id1 job_id2 job_id3 number exit_code
set jobmatch 0
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id1 $expect_out(1,string)
send_user "\njob $job_id1 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "Granted job allocation ($number)" {
set job_id2 $expect_out(1,string)
send_user "\njob $job_id2 was submitted\n"
incr jobmatch
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
spawn $salloc --account=$acct -n1 $srun $bin_sleep 100
expect {
-re "error" {
send_user "\nThis error is expected do not worry\n"
incr jobmatch
}
-re "Granted job allocation" {
send_user "\nThis should have failed but did not\n"
exit 1
}
timeout {
send_user "\nFAILURE: salloc is not responding\n"
exit 1
}
eof {
wait
}
}
if {$jobmatch==0} {
send_user "\nFAILURE: jobs were not submitted\n"
exit 1
}
# cancels the remaining jobs
cancel_job $job_id1
cancel_job $job_id2
}
#!/usr/bin/expect
############################################################################
# Purpose: Test of SLURM functionality
# Test that checks if the QOS limits are enforced.
#
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
# "FAILURE: ..." otherwise with an explanation of the failure, OR
# anything else indicates a failure mode that must be investigated.
############################################################################
# Copyright (C) 2012 SchedMD LLC
# Written by Nathan Yee <nyee32@schedmd.com>
#
# This file is part of SLURM, a resource management program.
# For details, see <http://www.schedmd.com/slurmdocs/>.
# Please also read the included file: DISCLAIMER.
#
# SLURM 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.
#
# SLURM 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.
#
# You should have received a copy of the GNU General Public License along
# with SLURM; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
############################################################################
source ./globals
source ./globals_accounting
source ./inc21.30.1
source ./inc21.30.2
source ./inc21.30.3
source ./inc21.30.4
source ./inc21.30.5
source ./inc21.30.6
source ./inc21.30.7
source ./inc21.30.8
set test_id "21.30"
set exit_code 0
set acct test_acct
set job_id1 ""
set job_id2 ""
set job_id3 ""
set user_name ""
set qosname name
set qostest [format "%s %s" $test_id "qosTest"]
set grn GrpNodes
set grn_num 2
set grcpu GrpCpus
set grcpu_num 10
set grjobs GrpJobs
set grjobs_num 2
set grsub GrpSubmit
set grsub_num 2
set maxcpu MaxCpus
set maxcpu_num 10
set maxnodes MaxNodes
set maxnode_num 10
set maxjobs MaxJobs
set maxjobs_num 2
set maxjobsub MaxSubmitJobs
set maxjobsub_num 2
print_header $test_id
# Checks the state of the job
proc check_state { job } {
global scontrol job_id exit_code
set state_match 0
spawn $scontrol show job $job
expect {
"JobState=PENDING" {
incr state_match
}
timeout {
send_user "\nFAILURE scontrol not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$state_match != 1} {
send_user "\nFAILURE job is running when it should be pending\n"
exit 1
}
}
# modifies the QoS
proc mod_qos { node cpu job sub mcpu mnode mjobs mjobsub } {
global sacctmgr exit_code qosname qostest grn grcpu grjobs grsub maxcpu maxnodes maxjobs maxjobsub
set change_cnt 0
spawn $sacctmgr -i modify qos where $qosname=$qostest set $grn=$node $grcpu=$cpu $grjobs=$job $grsub=$sub $maxcpu=$mcpu $maxnodes=$mnode $maxjobs=$mjobs $maxjobsub=$mjobsub
expect {
-re "Modified qos" {
incr change_cnt
}
timeout {
send_user "\nFAILURE sacctmgr not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$change_cnt==0} {
send_user "\nFAILURE: sacctmgr did not change qos $qostest\n"
set exit_code 1
}
}
#gets user
spawn $bin_id -u -n
expect {
-re "($alpha_numeric_under)" {
set user_name $expect_out(1,string)
exp_continue
}
eof {
wait
}
}
# add qos
set qosmatch 0
spawn $sacctmgr -i add qos $qosname=$qostest
expect {
-re "Adding QOS" {
incr qosmatch
exp_continue
}
timeout {
send_user "\nFAILURE: sacctmgr did not add QOS\n"
set exit_code 1
}
eof {
wait
}
}
#add account with qos
set acctmatch 0
spawn $sacctmgr -i add account $acct qos=$qostest
expect {
-re "Adding Account" {
incr acctmatch
exp_continue
}
-re "Nothing new added" {
send_user "\nWARNING: vestigial account $acct found\n"
incr acctmatch
exp_continue
}
timeout {
send_user "\nFAILURE: sacctmgr is not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$acctmatch != 1} {
send_user "\nFAILURE: sacctmgr had a problem adding the account\n"
exit 1
}
#add user to account
spawn $sacctmgr -i create user name=$user_name account=$acct
expect {
timeout {
send_user "\nFAILURE: sacctmgr not responding\n"
}
eof {
wait
}
}
mod_qos $grn_num -1 -1 -1 -1 -1 -1 -1
sleep 5
#test GrpNode limit
inc21_30_1
mod_qos -1 $grcpu_num -1 -1 -1 -1 -1 -1
sleep 5
#test GrpCpus
inc21_30_2
mod_qos -1 -1 $grjobs_num -1 -1 -1 -1 -1
sleep 5
# test GrpJob limits
inc21_30_3
mod_qos -1 -1 -1 $grsub_num -1 -1 -1 -1
sleep 5
# test GrpSubmit
inc21_30_4
mod_qos -1 -1 -1 -1 $maxcpu_num -1 -1 -1
sleep 5
#test MaxCpus limits
inc21_30_5
mod_qos -1 -1 -1 -1 -1 $maxnode_num -1 -1
sleep 5
#test MaxNode limit
inc21_30_6
mod_qos -1 -1 -1 -1 -1 -1 $maxjobs_num -1
sleep 5
#test MaxJobs limit
inc21_30_7
mod_qos -1 -1 -1 -1 -1 -1 -1 $maxjobsub_num
sleep 5
#test MaxJobsSubmits limit
inc21_30_8
# delete qos
spawn $sacctmgr -i delete qos $qostest
expect {
-re "Deleting QOS(s)" {
exp_continue
}
-re "Error" {
send_user "\nFAILURE: QOS was not deleted\n"
}
timeout {
send_user "\nFAILURE: sacctmgr is not responding\n"
}
eof {
wait
}
}
#delete account
spawn $sacctmgr -i delete account $acct
expect {
-re "Deleting accounts" {
exp_continue
}
-re "Error" {
send_user "\nFAILURE: account was not deleted\n"
set exit_code 1
}
timeout {
send_user "\nFAILURE: sacctmgr is not responding\n"
set exit_code 1
}
eof {
wait
}
}
if {$exit_code==0} {
print_success $test_id
}
exit $exit_code
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment