fsstress: add the ability to create/delete subvolumes
[xfstests-dev.git] / ltp / fsx.c
index 391824bfbc68e1c58ab438ca7f7f80012f2a26a5..06d08e4e93f33d19f8bcae3e27a2e0e158990126 100644 (file)
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1364,7 +1364,7 @@ test_clone_range(void)
        };
 
        if (ioctl(fd, FICLONERANGE, &fcr) &&
-           (errno = EOPNOTSUPP || errno == ENOTTY)) {
+           (errno == EOPNOTSUPP || errno == ENOTTY)) {
                if (!quiet)
                        fprintf(stderr,
                                "main: filesystem does not support "
@@ -1581,9 +1581,9 @@ do_dedupe_range(unsigned offset, unsigned length, unsigned dest)
 int
 test_copy_range(void)
 {
-       loff_t o1 = 0, o2 = 0;
+       loff_t o1 = 0, o2 = 1;
 
-       if (syscall(__NR_copy_file_range, fd, &o1, fd, &o2, 0, 0) == -1 &&
+       if (syscall(__NR_copy_file_range, fd, &o1, fd, &o2, 1, 0) == -1 &&
            (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTTY)) {
                if (!quiet)
                        fprintf(stderr,