I tried Mohammad's suggestion, and the tests now write two files in the current working directory: "test.dat" and "test_static.dat". This appears to be working correctly on my system with make check -j8. All function calls to tmpfile() have been removed.
It would be great if a windows person can test the latest git repository to see if the issue is fixed Thanks, Patrick On 06/22/2017 10:41 AM, Brian Gladman wrote: > I assume that by 'race condition' you mean that any tests running in > parallel would both be using the same file (IIRC "test.dat"). > > If so, you could possibly revert your change and use the tmpnam() > function to set the filename to be used. > > I don't know where the resulting file would be placed with GCC but on > Windows this will return a filename that is unique in the current > working directory, which would be likely to have the right access > permission. However, the MS documentation simply says that > > "tmpnam returns a name unique in the current working directory" > > which suggests that this won't solve the race condition. > > We could possibly maintain full c89 compatibility for GSL itself but > relax this requirement for these two tests and use mkstemp and the MSVC > equivalent (_mktemp or _mktemp_s) that seem to avoid the problem. > > I cant test for these failures however as they don't occur for me as I > am running the build with admin privileges. > > best regards, > > Brian > >