diff --git a/testsuite/expect/test1.89 b/testsuite/expect/test1.89 index 2f9a26bfa51b9a27282db059db08afdc4604c16e..3e3003f29fd8a750f0a6e68de362d4711bb2c1ed 100755 --- a/testsuite/expect/test1.89 +++ b/testsuite/expect/test1.89 @@ -125,6 +125,72 @@ if {$task_mask != $mask} { set exit_code 1 } +# +# Run a job step with verbosity and all tasks on CPU 0 +# +set task_mask 0 +set verbose_cnt 0 +send "$srun -c1 --cpu_bind=verbose,map_cpu:0 $file_prog\n" +expect { + -re "TASK_ID:($number),MASK:($number)" { + incr task_mask $expect_out(2,string) + exp_continue + } + -re "setting affinity of task" { + incr verbose_cnt + exp_continue + } + -re "error" { + send_user "\nFAILURE: some error occurred\n" + set exit_code 1 + exp_continue + } + timeout { + send_user "\nFAILURE: srun (from --allocate) not responding\n" + set exit_code 1 + exp_continue + } + -re $prompt +} +if {$task_mask != $task_cnt} { + send_user "\nFAILURE: affinity mask inconsistent ($task_mask,$task_cnt)\n" + set exit_code 1 +} +if {$verbose_cnt != $task_cnt} { + send_user "\nFAILURE: verbose messages count inconsisent ($verbose_cnt,$task_cnt)\n" + set exit_code 1 +} + +# +# Run a job step all tasks on CPU 0 by specifying mask +# +set task_mask 0 +send "$srun -c1 --cpu_bind=mask_cpu:1 $file_prog\n" +expect { + -re "TASK_ID:($number),MASK:($number)" { + incr task_mask $expect_out(2,string) + exp_continue + } + -re "error" { + send_user "\nFAILURE: some error occurred\n" + set exit_code 1 + exp_continue + } + timeout { + send_user "\nFAILURE: srun (from --allocate) not responding\n" + set exit_code 1 + exp_continue + } + -re $prompt +} +if {$task_mask != $task_cnt} { + send_user "\nFAILURE: affinity mask inconsistent ($task_mask,$task_cnt)\n" + set exit_code 1 +} + +# +# Terminate the job, free the allocation +# send "exit\n" expect { -re "error" {