@@ -43,7 +43,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/mman-linux.h
tests += tst-clone tst-clone2 tst-fanotify tst-personality tst-quota \
- tst-fallocate tst-fallocate64 tst-sync_file_range
+ tst-sync_file_range
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
@@ -173,6 +173,8 @@ ifeq ($(subdir),io)
sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
sync_file_range fallocate fallocate64
sysdep_headers += bits/fcntl-linux.h
+
+tests += tst-fallocate tst-fallocate64
endif
ifeq ($(subdir),elf)
@@ -58,7 +58,13 @@ do_test_with_offset (off_t offset)
and check if both buffer have the same contents. */
ret = fallocate (temp_fd, 0, offset, BLK_SIZE);
if (ret == -1)
- FAIL_EXIT1 ("fallocate failed");
+ {
+ /* fallocate might not be fully supported by underlying filesystem (for
+ instance some NFS versions). */
+ if (errno == EOPNOTSUPP)
+ FAIL_EXIT (77, "fallocate not supported");
+ FAIL_EXIT1 ("fallocate failed");
+ }
ret = fstat (temp_fd, &finfo);
if (ret == -1)