aboutsummaryrefslogtreecommitdiff
path: root/misc/tst-preadvwritev64.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 /misc/tst-preadvwritev64.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 'misc/tst-preadvwritev64.c')
-rw-r--r--misc/tst-preadvwritev64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/tst-preadvwritev64.c b/misc/tst-preadvwritev64.c
index b718da6..451d03e 100644
--- a/misc/tst-preadvwritev64.c
+++ b/misc/tst-preadvwritev64.c
@@ -26,6 +26,12 @@ do_test (void)
ret = do_test_with_offset (0);
+ if (!temp_fd_supports_holes)
+ {
+ puts ("warning: partial test due to lack of support for holes");
+ return ret;
+ }
+
/* Create a sparse file larger than 4GB to check if offset is handled
correctly in p{write,read}v64. */
off_t base_offset = UINT32_MAX + 2048LL;