If you run into a test failure, and it's hard to reproduce, you're interested in the core file for the original failure. If the target machine is set to generate cores with the simple name 'core', the core you're interested in may already have been overwritten, f.i. by a non-interesting xfail abort. It might be a good idea to distinguish between interesting and non-interesting cores, and keep the interesting ones.
Created attachment 34854 [details] Demonstrator patch Run with f.i. gfortran.dg/block_6.f08 to see that the core is cleaned up.
I don't see why the dejagnu or the testsuite should care. If dumping everything under core filename is not what you want, then perhaps use different core file pattern?
(In reply to Jakub Jelinek from comment #2) > I don't see why the dejagnu or the testsuite should care. If dumping > everything under core filename is not what you want, then perhaps use > different core file pattern? AFAIU, you need sudo for that, and not everybody has access to that on their test systems. And if you can change the core file pattern, the difference between interesting and noninteresting cores remains. Changing the core file pattern means that the interesting core files do not get overwritten anymore. But it's still a good idea to clean up the non-interesting ones. Changing the core file pattern will mean that there will be more of those.
I don't think this is a good thing. In fact it is a bad thing as you could run out of space due to the core file multiples. If you have a failure you can run it manually to debug it anyways.