diff options
author | Florian Weimer <fweimer@redhat.com> | 2018-08-21 12:56:53 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2018-08-21 12:56:53 +0200 |
commit | aa42b3dbcb0326badf377fec2c7fb2f34fdabecd (patch) | |
tree | 818cd4e9c75b0dba8c982ce5d3b5def2d358ba05 /io/test-lfs.c | |
parent | c7627f41baaeb7f1a7b73ff66ef48eaafc1990f6 (diff) | |
download | glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.gz glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.xz glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.zip |
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 'io/test-lfs.c')
-rw-r--r-- | io/test-lfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/io/test-lfs.c b/io/test-lfs.c index f7721a5995..52120e9bca 100644 --- a/io/test-lfs.c +++ b/io/test-lfs.c @@ -25,6 +25,7 @@ #include <error.h> #include <errno.h> #include <sys/resource.h> +#include <support/check.h> /* Prototype for our test function. */ extern void do_prepare (int argc, char *argv[]); @@ -70,6 +71,8 @@ do_prepare (int argc, char *argv[]) else error (EXIT_FAILURE, errno, "cannot create temporary file"); } + if (!support_descriptor_supports_holes (fd)) + FAIL_UNSUPPORTED ("File %s does not support holes", name); add_temp_file (name); if (getrlimit64 (RLIMIT_FSIZE, &rlim) != 0) |