Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by tye (Sage)
on Nov 22, 2012 at 22:31 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1005193]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found