From aa42b3dbcb0326badf377fec2c7fb2f34fdabecd Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 21 Aug 2018 12:56:53 +0200 Subject: 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). --- timezone/tst-tzset.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'timezone/tst-tzset.c') 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 #include #include +#include #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); -- cgit v1.2.3