Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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

by tye (Sage)
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005193]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-03-18 20:24 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.