fsx: check ENOSYS in test_copy_range() & test_fallocate()
[xfstests-dev.git] / ltp / fsx.c
index 316f08eb3b9f387ca22446b4131855ac7b731558..f4a1c7cf820bd2843684d7df2e8625a82d87b399 100644 (file)
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1583,7 +1583,7 @@ test_copy_range(void)
        loff_t o1 = 0, o2 = 0;
 
        if (syscall(__NR_copy_file_range, fd, &o1, fd, &o2, 0, 0) == -1 &&
-           (errno == EOPNOTSUPP || errno == ENOTTY)) {
+           (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTTY)) {
                if (!quiet)
                        fprintf(stderr,
                                "main: filesystem does not support "
@@ -2423,7 +2423,8 @@ __test_fallocate(int mode, const char *mode_str)
 #ifdef HAVE_LINUX_FALLOC_H
        int ret = 0;
        if (!lite) {
-               if (fallocate(fd, mode, file_size, 1) && errno == EOPNOTSUPP) {
+               if (fallocate(fd, mode, file_size, 1) &&
+                   (errno == ENOSYS || errno == EOPNOTSUPP)) {
                        if(!quiet)
                                fprintf(stderr,
                                        "main: filesystem does not support "