tests/mountable/test-internal-parse-mountable.c: Don't fully allocate 1GB disk.

This test required 1 GB of free space since it used posix_fallocate
instead of creating a sparse disk.  Use truncate instead.
This commit is contained in:
Richard W.M. Jones
2013-05-22 14:19:57 +01:00
parent 72afcf450a
commit 553ffd7a94

View File

@@ -38,9 +38,8 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
int r = posix_fallocate (fd, 0, 1024*1024*1024);
if (r != 0) {
fprintf (stderr, "posix_fallocate " IMG " 1G: %s\n", strerror (r));
if (ftruncate (fd, 1024 * 1024 * 1024) == -1) {
perror ("truncate " IMG " 1G");
unlink (IMG);
exit (EXIT_FAILURE);
}