Skip to content
Snippets Groups Projects
Commit 87ed2bab authored by Moe Jette's avatar Moe Jette
Browse files

fix bug in test4.12 which caused failure when the first node in the

default partition was not idle. new logic tests every node in the 
default partition for an idle one.
parent 20bcf432
No related branches found
No related tags found
No related merge requests found
...@@ -358,50 +358,31 @@ if {$host_cnt == 0} { ...@@ -358,50 +358,31 @@ if {$host_cnt == 0} {
# find me an idle node in default partition # find me an idle node in default partition
log_user 0 log_user 0
set inode_procs 0 set inode_procs 0
spawn $scontrol -o show node $def_hostlist set host_inx 0
expect { while {$host_inx <= $host_cnt} {
-re "^NodeName=($alpha_numeric_under)" { spawn $scontrol -o show node $host_name($host_inx)
set inode_name $expect_out(1,string) expect {
set inode_procs 1 -re "^NodeName=($alpha_numeric_under) .*CoresPerSocket=($number) .*CPUTot=($number)(K?).* Sockets=($number) State=IDLE ThreadsPerCore=($number)" {
} set inode_name $expect_out(1,string)
timeout { set inode_cores_per_socket $expect_out(2,string)
send_user "\nFAILURE: scontrol not responding\n" set inode_procs $expect_out(3,string)
set exit_code 1 if {[string compare $expect_out(4,string) ""]} {
} set inode_procs [expr $inode_procs * 1024]
eof { }
wait set inode_sockets $expect_out(5,string)
} set inode_threads_per_core $expect_out(6,string)
} set host_inx $host_cnt
exp_continue
if {!$inode_procs} { }
send_user "\nFAILURE: couldn't find an idle node in the default partition\n" timeout {
exit 1 send_user "\nFAILURE: scontrol not responding\n"
} set exit_code 1
}
# We have to do this a second time since we can't rely on expect getting 1 eof {
# line at a line so we could in theory get cpu counts from a different wait
# node than we expect, thus messing the test up.
set inode_procs 0
spawn $scontrol -o show node $inode_name
expect {
-re "^NodeName=($alpha_numeric_under) .*CoresPerSocket=($number) .*CPUTot=($number)(K?).* Sockets=($number) State=IDLE ThreadsPerCore=($number)" {
set inode_name $expect_out(1,string)
set inode_cores_per_socket $expect_out(2,string)
set inode_procs $expect_out(3,string)
if {[string compare $expect_out(4,string) ""]} {
set inode_procs [expr $inode_procs * 1024]
} }
set inode_sockets $expect_out(5,string)
set inode_threads_per_core $expect_out(6,string)
}
timeout {
send_user "\nFAILURE: scontrol not responding\n"
set exit_code 1
}
eof {
wait
} }
incr host_inx
} }
log_user 1 log_user 1
......
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