Merge pull request #2132 from tophj-ibm/lower-mkfs-size
[testing] use smaller filesize on 4KB pagesize systems
This commit is contained in:
commit
ea58933dbc
@ -29,7 +29,14 @@ func boltSnapshotter(t *testing.T) func(context.Context, string) (snapshots.Snap
|
|||||||
|
|
||||||
return func(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) {
|
return func(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) {
|
||||||
|
|
||||||
deviceName, cleanupDevice, err := testutil.NewLoopback(650 << 20) // 650 MB
|
loopbackSize := int64(100 << 20) // 100 MB
|
||||||
|
// mkfs.btrfs creates a fs which has a blocksize equal to the system default pagesize. If that pagesize
|
||||||
|
// is > 4KB, mounting the fs will fail unless we increase the size of the file used by mkfs.btrfs
|
||||||
|
if os.Getpagesize() > 4096 {
|
||||||
|
loopbackSize = int64(650 << 20) // 650 MB
|
||||||
|
}
|
||||||
|
deviceName, cleanupDevice, err := testutil.NewLoopback(loopbackSize)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user