Merge pull request #3319 from MichaelEischer/skip-prealloc-test
restorer: Skip preallocate test if not supported by the filesystem
This commit is contained in:
commit
74c0607c92
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/restic/restic/internal/fs"
|
"github.com/restic/restic/internal/fs"
|
||||||
|
@ -24,6 +25,9 @@ func TestPreallocate(t *testing.T) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
err = preallocateFile(wr, i)
|
err = preallocateFile(wr, i)
|
||||||
|
if err == syscall.ENOTSUP {
|
||||||
|
t.SkipNow()
|
||||||
|
}
|
||||||
test.OK(t, err)
|
test.OK(t, err)
|
||||||
|
|
||||||
fi, err := wr.Stat()
|
fi, err := wr.Stat()
|
||||||
|
|
Loading…
Reference in a new issue