aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2016-03-29 23:34:37 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2016-03-30 06:56:25 +0000
commit897dcdb5ecc001fac328c53806f8a1dbf2e8c3fd (patch)
tree74a78c539e10a13d129e771dcdf2bf6115e81b03 /src/debug
parent354e9778a3327e125ed99e86d7b6e648ed0ccd53 (diff)
downloadgo-897dcdb5ecc001fac328c53806f8a1dbf2e8c3fd.tar.xz
debug/elf: deflake file_test.go
It is valid for io.Reader to return (n, io.EOF) where n is positive. The unit test should not fail if io.EOF is returned when read until the end. Change-Id: I7b918e3cc03db8b90c8aa58f4c0f7806a1d4af7e Reviewed-on: https://go-review.googlesource.com/21307 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/elf/file_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug/elf/file_test.go b/src/debug/elf/file_test.go
index 42caefa4cf..2fe6febb26 100644
--- a/src/debug/elf/file_test.go
+++ b/src/debug/elf/file_test.go
@@ -688,7 +688,7 @@ func TestCompressedSection(t *testing.T) {
if end > int64(len(buf)) {
end = int64(len(buf))
}
- n, err := sf.Read(buf[pos:end])
+ n, err := io.ReadFull(sf, buf[pos:end])
if err != nil {
t.Fatal(err)
}