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 /timezone | |
parent | Makeconfig: Do not sort and deduplicate +cflags [BZ # 17248] (diff) | |
download | glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.gz glibc-aa42b3dbcb0326badf377fec2c7fb2f34fdabecd.tar.bz2 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 'timezone')
-rw-r--r-- | timezone/tst-tzset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/timezone/tst-tzset.c b/timezone/tst-tzset.c index 27f986b56d..744c583f7e 100644 --- a/timezone/tst-tzset.c +++ b/timezone/tst-tzset.c @@ -24,6 +24,7 @@ #include <sys/resource.h> #include <time.h> #include <unistd.h> +#include <support/check.h> #define TIMEOUT 5 static int do_test (void); @@ -38,6 +39,8 @@ create_tz_file (off64_t size) int fd = create_temp_file ("tst-tzset-", &path); if (fd < 0) exit (1); + if (!support_descriptor_supports_holes (fd)) + FAIL_UNSUPPORTED ("File %s does not support holes", path); // Reopen for large-file support. close (fd); |