Ticket 461

Summary: Make sure all tests clean up after themselves.
Product: Slurm Reporter: Danny Auble <da>
Component: Test SuiteAssignee: Nathan Yee <nyee32>
Status: RESOLVED FIXED QA Contact:
Severity: 5 - Enhancement    
Priority: ---    
Version: 14.03.x   
Hardware: Linux   
OS: Linux   
Site: SchedMD Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC 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
Fixed test1.34 so it cleans up when the test is complete

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