projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
7329: since moved functional testing into generic testing, removing now redundant...
[arvados.git]
/
services
/
keepstore
/
volume_unix.go
diff --git
a/services/keepstore/volume_unix.go
b/services/keepstore/volume_unix.go
index afae2796bc6aa613fa75b36b3b00092f1950d89e..6c0f5c4e978d995b5c9308f52d5d2414045d64fc 100644
(file)
--- a/
services/keepstore/volume_unix.go
+++ b/
services/keepstore/volume_unix.go
@@
-122,6
+122,13
@@
func (v *UnixVolume) Compare(loc string, expect []byte) error {
bufLen := 1 << 20
if int64(bufLen) > stat.Size() {
bufLen = int(stat.Size())
bufLen := 1 << 20
if int64(bufLen) > stat.Size() {
bufLen = int(stat.Size())
+ if bufLen < 1 {
+ // len(buf)==0 would prevent us from handling
+ // empty files the same way as non-empty
+ // files, because reading 0 bytes at a time
+ // never reaches EOF.
+ bufLen = 1
+ }
}
cmp := expect
buf := make([]byte, bufLen)
}
cmp := expect
buf := make([]byte, bufLen)