Hi *,

I’m trying to understand  a few pieces of code in the testsuite,

As it so happens quite a few tests randomly fail on newer msys2 and python 
installs:

   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')
   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')
   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')
   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')

(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.)

Anyone have any ideas? I’m not very familiar with the internals of the 
testsuite.

Secondly, I’ve noticed all paths in the testsuite are relative paths. And this 
hand me wondering, relative to what. 

I see that in do_test we actually change directories

837     if opts.pre_cmd: 
838         exit_code = runCmd('cd "{0}" && {1}'.format(opts.testdir, 
opts.pre_cmd))

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?

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?

Cheers,
Tamar
_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to