aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/tst-fallocate-common.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-08-21 12:56:53 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-08-21 12:56:53 +0200
commitaa42b3dbcb0326badf377fec2c7fb2f34fdabecd (patch)
tree818cd4e9c75b0dba8c982ce5d3b5def2d358ba05 /sysdeps/unix/sysv/linux/tst-fallocate-common.c
parentc7627f41baaeb7f1a7b73ff66ef48eaafc1990f6 (diff)
downloadglibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.zip
glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.gz
glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.bz2
Avoid running some tests if the file system does not support holes
Otherwise, these tests fills up the entire disk (or just run very slowly and eventually time out).
Diffstat (limited to 'sysdeps/unix/sysv/linux/tst-fallocate-common.c')
-rw-r--r--sysdeps/unix/sysv/linux/tst-fallocate-common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-fallocate-common.c b/sysdeps/unix/sysv/linux/tst-fallocate-common.c
index a6ba403..bc54cf5 100644
--- a/sysdeps/unix/sysv/linux/tst-fallocate-common.c
+++ b/sysdeps/unix/sysv/linux/tst-fallocate-common.c
@@ -41,6 +41,8 @@ do_prepare (int argc, char **argv)
temp_fd = create_temp_file ("tst-fallocate.", &temp_filename);
if (temp_fd == -1)
FAIL_EXIT1 ("cannot create temporary file: %m");
+ if (!support_descriptor_supports_holes (temp_fd))
+ FAIL_UNSUPPORTED ("File %s does not support holes", temp_filename);
}
#define PREPARE do_prepare