Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
There's more than one way to do things
 
PerlMonks  

Re: Where should (or could) a distribution override HARNESS_OPTIONS? (flock)

by tye (Cardinal)
on Nov 22, 2012 at 22:31 UTC ( #1005193=note: print w/ replies, xml ) Need Help??


in reply to Where should (or could) a distribution override HARNESS_OPTIONS?

I agree with afoken in being surprised at the thought of gcc not working properly just because it was run multiple times in parallel. I could see that causing a problem if both instances were trying to write to the same file, say, a.out, for example.

I would be surprised if a test script can impact the behavior of the invoking test harness without the test harness having explicitly set up a method for passing control information in that direction.

But you don't have to prevent the harness from trying to run tests in parallel. You just have to prevent the tests from simultaneously doing conflicting things at the same time.

The simplest way I see of doing that is having a sentinel file (pre-created as part of the distribution) for each unsharable resource. The parts of each test that need exclusive access to that resource can 'flock' the file for the duration of their use of that resource.

- tye        


Comment on Re: Where should (or could) a distribution override HARNESS_OPTIONS? (flock)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005193]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-04-17 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (453 votes), past polls