mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
quota: increase sparse test-image to 300MB
Starting with [6e0ed3d19c54603f0f7d628ea04b550151d8a262], the minimum
allowed size is now 300MB. Given that this is a sparse image, and
the size of the image is irrelevant to the test (we check for
limits defined through project-quotas, not the size of the
device itself), we can raise the size of this image.
[6e0ed3d19c54603f0f7d628ea04b550151d8a262]: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=6e0ed3d19c54603f0f7d628ea04b550151d8a262
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9709b7e458)
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
committed by
Cory Snider
parent
5d3fbceff0
commit
1a92ba6573
@@ -11,8 +11,6 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const imageSize = 64 * 1024 * 1024
|
||||
|
||||
// CanTestQuota - checks if xfs prjquota can be tested
|
||||
// returns a reason if not
|
||||
func CanTestQuota() (string, bool) {
|
||||
@@ -29,6 +27,12 @@ func CanTestQuota() (string, bool) {
|
||||
// PrepareQuotaTestImage - prepares an xfs prjquota test image
|
||||
// returns the path the the image on success
|
||||
func PrepareQuotaTestImage(t *testing.T) (string, error) {
|
||||
// imageSize is the size of the test-image. The minimum size allowed
|
||||
// is 300MB.
|
||||
//
|
||||
// See https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=6e0ed3d19c54603f0f7d628ea04b550151d8a262
|
||||
const imageSize = 300 * 1024 * 1024
|
||||
|
||||
mkfs, err := exec.LookPath("mkfs.xfs")
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user