<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi *,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m trying to understand a few pieces of code in the testsuite,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>As it so happens quite a few tests randomly fail on newer msys2 and python installs:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> r:/temp/ghctest-0u4c8o/test spaces/./th/T12407.run T12407 [ext-interp] ([Error 183] Cannot create a file when that file already exists: 'r:/temp/ghctest-0u4c8o/test spaces/./th/T12407.run')</p><p class=MsoNormal> r:/temp/ghctest-0u4c8o/test spaces/./th/T11463.run T11463 [ext-interp] ([Error 183] Cannot create a file when that file already exists: 'r:/temp/ghctest-0u4c8o/test spaces/./th/T11463.run')</p><p class=MsoNormal> r:/temp/ghctest-0u4c8o/test spaces/./th/T12478_4.run T12478_4 [ext-interp] ([Error 183] Cannot create a file when that file already exists: 'r:/temp/ghctest-0u4c8o/test spaces/./th/T12478_4.run')</p><p class=MsoNormal> r:/temp/ghctest-0u4c8o/test spaces/./th/T12478_3.run T12478_3 [ext-interp] ([Error 183] Cannot create a file when that file already exists: 'r:/temp/ghctest-0u4c8o/test spaces/./th/T12478_3.run')</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(I say random, but the set of tests seem to be the same ones, just within that group a few randomly pass every so often. It’s mostly TH tests.)</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Anyone have any ideas? I’m not very familiar with the internals of the testsuite.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Secondly, I’ve noticed all paths in the testsuite are relative paths. And this hand me wondering, relative to what. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I see that in do_test we actually change directories</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>837 if opts.pre_cmd: </p><p class=MsoNormal>838 exit_code = runCmd('cd "{0}" && {1}'.format(opts.testdir, opts.pre_cmd))</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So I am now assuming that the relative paths are relative to the cwd. Which brings up the question.. how is this thread safe and working on Linux?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Surely any two tests can change the cwd and then one of them would be writing to the wrong place? Am I missing something here?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Cheers,</p><p class=MsoNormal>Tamar</p></div></body></html>