d/t/sacct, d/t/control: make sacct tests more reliable

Tests on slow some platforms might be racy for example s390x on Ubuntu autopkgtest infrastructure. An example could look like:

Execute srun:
srun: Required node not available (down, drained or reserved)
srun: job 4 queued and waiting for resources
srun: job 4 has been allocated resources
Execute sacct:
       JobID    JobName  Partition    Account  AllocCPUS      State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
2                  true       test       root          1  COMPLETED      0:0
3                job.sh       test       root          1  COMPLETED      0:0
4                  true       test  slurmtest          1  COMPLETED      0:0

As one can see there were warnings on stderr when submitting, but the job never the less completed just fine. Therefore allow stderr and check for the expected result in the sacct output instead - that will also ensure we would catch major output changes that might affect scripting.

The sacct test already has set -e which will break on any bad RC. Further lower the risk of races in general by bumping the sleep statements.

Merge request reports

Loading