perl core 5.8 fork test fails due to rand???

ddick on 2008-02-21T00:22:02

I have to admit i found this quite frustrating.

I've written a set of programs that do nightly builds that feed into nightly tests, blah, blah.

One of the requirements is that we bundle our own version of perl with the software, so, every night, perl gets ./Configure && make && make test && make install.

After time, perl's make test failed in 't/op/fork.t'. The next night it worked thou.

After receiving a query about the unexpected build failure from the local sys. admin. team, i did a bad thing and decided that if fork was failing and then started working again, this could indicate a hardware issue.

*BBBBBBBBBBZZZZZZZZZZZZZZZTTTT*

Sorry!!! it could also indicate that 't/op/fork.t' is actually testing the rand() functionality.

't/op/fork.t' doesn't do anything at all with srand before forking a calling rand in each new process.

The test depends on the rand() in each process producing different results

Not surprisingly, 't/op/fork.t' fails fairly regularly.


Did you perlbug it?

btilly on 2008-02-21T07:13:13

Or, better yet, supply a patch?

Re:Did you perlbug it?

ddick on 2008-02-21T10:27:46

yes, i suppose i deserved that. :)

So basically...

Alias on 2008-02-22T01:01:24

You just need to loop 100 times and compare an array of each? :)

Sounds like a quick patch :)