Race hazard in Random library test suite
|Reported by:||simonpj||Owned by:||rrnewton|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Revisions:|
In a validate run, rangeTest fails thus
=====> rangeTest(normal) 2838 of 2886 [0, 4, 0] cd ../../../libraries/random/tests && '/64playpen/simonpj/builds/HEAD-1/bindisttest/install dir/bin/ghc' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts -o rangeTest rangeTest.hs -i.. -XCPP >rangeTest.comp.stderr 2>&1 =====> random1283(normal) 2839 of 2886 [0, 4, 0] cd ../../../libraries/random/tests && '/64playpen/simonpj/builds/HEAD-1/bindisttest/install dir/bin/ghc' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts -o random1283 random1283.hs -i.. -XCPP -package containers >random1283.comp.stderr 2>&1 Compile failed (status 256) errors were: [1 of 2] Compiling System.Random ( ../System/Random.hs, ../System/Random.o ) [2 of 2] Compiling Main ( rangeTest.hs, rangeTest.o ) Linking rangeTest ... ../System/Random.o: file not recognized: File truncated collect2: ld returned 1 exit status *** unexpected failure for rangeTest(normal)
The problem is this, in libraries/random/tests/all.T:
# This lets me run tests from the test directory during development: opts = '-i.. -XCPP '
This is causing all the tests to compile the source, rather than using
the package. If two of the tests get run in parallel then there is a
Ryan, could you handle this differently, so those flags don't get passed
by default, please? Perhaps have them conditionally set, based on
whether a file has been 'touch'ed or whether a make variable has been
set, or maybe make a testsuite wrapper for yourself which builds the
package so that they aren't necessary?