mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user