Skip to content

Commit

Permalink
Merge branch 'slurm-20.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
agilmor committed Jan 25, 2021
2 parents e319226 + bc8420e commit 73f983b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions testsuite/expect/test20.15
Expand Up @@ -32,3 +32,22 @@ if {[file executable $seff] == 0} {

set out [run_command_output -fail -xfail "$seff -h"]
subtest {[regexp "Usage:" $out]} "seff -h should return Usage:"

set job_id [submit_job -fail "-H --wrap=\"sleep 10\""]
wait_for_command "$sacct" "-n -j $job_id" "PENDING"
set out [run_command_output -fail "$seff $job_id" ]
subtest {[regexp "State: PENDING" $out]} "Job should be returned as in PENDING state by seff"
subtest {[regexp "Cores: 1" $out]} "Job should be reported as 1 core"
subtest {[regexp "Efficiency not available for jobs in the PENDING state." $out]} "Job should be reported as efficiency not available for PENDING state"

run_command -fail "$scontrol release $job_id"
wait_for_command "$sacct" "-X -n -j $job_id" "RUNNING"

set out [run_command_output -fail "$seff $job_id"]
subtest {[regexp "State: RUNNING" $out]} "Job should be reported as RUNNING by seff"
subtest {[regexp "WARNING: Efficiency statistics may be misleading for RUNNING jobs." $out]} "seff output should contain warning about staistics for RUNNING job"

wait_for_command "$sacct" "-X -n -j $job_id" "COMPLETED"
set out [run_command_output -fail "$seff $job_id"]
subtest {[regexp "State: COMPLETED" $out]} "Job should be reported as COMPLETED by seff"
subtest {[regexp -line {CPU Efficiency: 0.00% of 00:00:1\d core-walltime} $out]} "Job efficiency should be 0.00% of >=10s core-walltime"

0 comments on commit 73f983b

Please sign in to comment.