aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/findholes/holes/holes.go4
-rwxr-xr-xtest.bash2
-rw-r--r--tests/root_test/root_test.go1
3 files changed, 3 insertions, 4 deletions
diff --git a/contrib/findholes/holes/holes.go b/contrib/findholes/holes/holes.go
index 7d77ae1..307c624 100644
--- a/contrib/findholes/holes/holes.go
+++ b/contrib/findholes/holes/holes.go
@@ -121,7 +121,7 @@ func Find(fd int) (segments []Segment, err error) {
if err == syscall.ENXIO {
segments = append(segments,
Segment{totalSize, SegmentEOF})
- return segments, nil
+ break
}
if err != nil {
return nil, err
@@ -136,7 +136,7 @@ func Find(fd int) (segments []Segment, err error) {
return segments, nil
}
-// Verify the gives `segments` using a full bytewise file scan
+// Verify `segments` using a full bytewise file scan
func Verify(fd int, segments []Segment) (err error) {
last := segments[len(segments)-1]
if last.Type != SegmentEOF {
diff --git a/test.bash b/test.bash
index 091f0ac..1af1d43 100755
--- a/test.bash
+++ b/test.bash
@@ -50,7 +50,7 @@ if ! go tool | grep vet > /dev/null ; then
elif [[ -d vendor ]] ; then
echo "vendor directory exists, skipping 'go tool vet'"
else
- go vet "$@" .
+ go vet "$@" ./...
fi
if command -v shellcheck > /dev/null ; then
diff --git a/tests/root_test/root_test.go b/tests/root_test/root_test.go
index 5a98feb..d9d5dfc 100644
--- a/tests/root_test/root_test.go
+++ b/tests/root_test/root_test.go
@@ -136,7 +136,6 @@ func writeTillFull(t *testing.T, path string) (int, syscall.Errno) {
}
sz += n
}
- return sz, 0
}
// TestDiskFull needs root permissions because it creates a loop disk