develooper Front page | perl.perl5.porters | Postings from July 2000

[ID 20000725.004] srand() test fails for both drand48 and randomin perl5.6/solaris5.6/gcc2.8.1

Thread Next
From:
Eric Silber
Date:
July 25, 2000 15:25
Subject:
[ID 20000725.004] srand() test fails for both drand48 and randomin perl5.6/solaris5.6/gcc2.8.1
Message ID:
4.3.1.2.20000725182436.00afad60@bronze.nimbus.northernlight.com
platform: SunOS gulliver 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-2

compiler: gulliver% gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs
gcc version 2.8.1

issue: selecting drand48 or random both result in a perl build with a single
test failure at test 7 of op/ran.t ( calling srand with no arg )

# Hints for TEST 7
#
# This checks that srand without arguments gives
# different sequences each time. Note: You shouldn't
# be calling srand more than once unless you know
# what you're doing! But if this fails on your
# system, run perlbug and let the developers know
# what other sources of randomness srand should
# tap into.
#
while ($time == time) { } # Wait for new second, just in case.
srand;
if ((join ", ", rand, rand, rand) eq $rand) {
print "not ok 7\n";
print "# srand without args isn't varying.\n";
} else {
print "ok 7\n";
}
}

op/pwent.............ok
op/quotemeta.........ok
op/rand..............FAILED at test 7... 



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About