1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

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).
This commit is contained in:
Florian Weimer
2018-08-21 12:56:53 +02:00
parent c7627f41ba
commit aa42b3dbcb
10 changed files with 135 additions and 1 deletions

View File

@ -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)