Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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]
[jedikaiti]: Doing OK, but a little achy this AM - I think the cats were using me as a wrestling mat and mattress while I was asleep last night.
[marto]: I can relate to that somewhat, I'm a light sleeper and frequently get woken up by kids doing much the same as your cats
[jedikaiti]: Yea, the kids (& the cats) are good at that

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2017-07-25 15:10 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (374 votes). Check out past polls.