Ticket 461 - Make sure all tests clean up after themselves.
Summary: Make sure all tests clean up after themselves.
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: Test Suite (show other tickets)
Version: 14.03.x
Hardware: Linux Linux
: 5 - Enhancement
Assignee: Nathan Yee
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2013-10-15 07:21 MDT by Danny Auble
Modified: 2013-12-31 07:27 MST (History)
0 users

See Also:
Site: SchedMD
Slinky Site: ---
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
Google sites: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed: 14.03.0pre6
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
Fixes test so they remove files that were created (1.80 KB, patch)
2013-12-30 08:21 MST, Nathan Yee
Details | Diff
Fixed test1.34 so it cleans up when the test is complete (2.26 KB, patch)
2013-12-31 06:48 MST, Nathan Yee
Details | Diff

Note You need to log in before you can comment on or make changes to this ticket.
Description Danny Auble 2013-10-15 07:21:31 MDT
running

git status

will show you any "extra" files not in the mix.

Files like this...
testsuite/expect/test1.89.prog
testsuite/expect/test3.11.input

Should not be there.
Comment 1 Moe Jette 2013-10-15 07:35:11 MDT
Just to elaborate a bit.

Make sure there are no extra files in your git repository (git status).
Run the test suite.
Identify any extra files and modify the scripts to remove them. Only files associated with failed test should be left around.
Comment 2 Nathan Yee 2013-12-30 08:21:41 MST
Created attachment 585 [details]
Fixes test so they remove files that were created
Comment 3 Nathan Yee 2013-12-31 06:48:14 MST
Created attachment 586 [details]
Fixed test1.34 so it cleans up when the test is complete
Comment 4 Moe Jette 2013-12-31 07:27:55 MST
I modified test1.34 to run a script that cleans up the core files in the same srun command. You don't want to execute a second srun command, which might reference a different compute node from where the first job ran.

Also the use of spawn/exec was not required since a simple exec call will suffice if the output does not require parsing

Finally, the current working directory is not always in the search path (at least not on all configurations, so this:
spawn $srun -n1 -t1 $file_in
should have been 
spawn $srun -n1 -t1 ./$file_in
(at least if the spawn call was preserved).

The other changes seemed fine.

The commit is here:
https://github.com/SchedMD/slurm/commit/8b10e04f73219d067c435f1e486f6611a8313407