Bill Blough created XERCESC-2123:
------------------------------------

             Summary: Tests sometimes fail when run in parallel, due to race 
conditions
                 Key: XERCESC-2123
                 URL: https://issues.apache.org/jira/browse/XERCESC-2123
             Project: Xerces-C++
          Issue Type: Bug
          Components: Samples/Tests
    Affects Versions: 3.2.0
         Environment: Debian GNU/Linux unstable, using the autotools build
            Reporter: Bill Blough
            Priority: Minor
         Attachments: fix_parallel_tests.diff

When using the autotools build and running make with the -j flag (to build in 
parallel), tests randomly fail.  There seem to be two main causes.

The first is a race condition between when the "observed" directory is tested 
for existence and when it is created.  Adding the -p flag to mkdir allows it to 
ignore failure on the exiting directory.

The second is that most of the ThreadTest tests are being written to the same 
logfile (ThreadTest1.log).  This causes write contention and all sorts of odd 
results.  Using separate logs for each test removes allows the writes to happen 
in any order without conflicting.

Patch attached.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to