chiark / gitweb /
copy: use btrfs reflinking only whe we know we copy full files
[elogind.git] / src / test / test-copy.c
index d2cad08cb69c86b40b2a817d96535874b05eec32..d70a0be2a22b798052073756645a18c9d02b5195 100644 (file)
@@ -67,8 +67,8 @@ static void test_copy_file_fd(void) {
         assert_se(out_fd >= 0);
 
         assert_se(write_string_file(in_fn, text) == 0);
-        assert_se(copy_file_fd("/a/file/which/does/not/exist/i/guess", out_fd) < 0);
-        assert_se(copy_file_fd(in_fn, out_fd) >= 0);
+        assert_se(copy_file_fd("/a/file/which/does/not/exist/i/guess", out_fd, true) < 0);
+        assert_se(copy_file_fd(in_fn, out_fd, true) >= 0);
         assert_se(lseek(out_fd, SEEK_SET, 0) == 0);
 
         assert_se(read(out_fd, buf, sizeof(buf)) == sizeof(text) - 1);