diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-04-25 04:40:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-04-25 04:40:49 +0000 |
commit | 2b210b6f0b56e12be0d6251805321dd078d7c5d6 (patch) | |
tree | f132ecb5fc0416b24da3356f674b3c069c47a752 /libgo/go | |
parent | b685de12d2e272782d1f7bfdd6fe7f8d2a6b3f28 (diff) | |
download | gcc-2b210b6f0b56e12be0d6251805321dd078d7c5d6.zip gcc-2b210b6f0b56e12be0d6251805321dd078d7c5d6.tar.gz gcc-2b210b6f0b56e12be0d6251805321dd078d7c5d6.tar.bz2 |
re PR go/52341 (crypto/rand FAILs before Solaris 11)
PR go/52341
crypto/rand: Use io.ReadFull when reading from /dev/urandom.
From-SVN: r186803
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/crypto/rand/rand_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/crypto/rand/rand_test.go b/libgo/go/crypto/rand/rand_test.go index be3a5a2..da091ba 100644 --- a/libgo/go/crypto/rand/rand_test.go +++ b/libgo/go/crypto/rand/rand_test.go @@ -7,6 +7,7 @@ package rand import ( "bytes" "compress/flate" + "io" "testing" ) @@ -16,9 +17,9 @@ func TestRead(t *testing.T) { n = 1e5 } b := make([]byte, n) - n, err := Read(b) + n, err := io.ReadFull(Reader, b) if n != len(b) || err != nil { - t.Fatalf("Read(buf) = %d, %s", n, err) + t.Fatalf("ReadFull(buf) = %d, %s", n, err) } var z bytes.Buffer |