]> git.saurik.com Git - apple/copyfile.git/blobdiff - copyfile_test/test_utils.h
copyfile-173.40.2.tar.gz
[apple/copyfile.git] / copyfile_test / test_utils.h
index a8fabf858e728ca4ee6ebc3d98d6c2b0ab25bd2f..decbe1e23f7d627f60267e830772c7b8dcba8b21 100644 (file)
 #define BSIZE_B                                        128
 #define MAX_DISK_IMAGE_SIZE_MB 1024
 
+#define DEFAULT_NAME_MOD               999
+#define DEFAULT_OPEN_FLAGS             O_CREAT|O_TRUNC|O_RDWR
+#define DEFAULT_OPEN_PERM              0666
+#define DEFAULT_MKDIR_PERM             0777
+
 #define DISK_IMAGE_PATH                        "/tmp/copyfile_sparse.sparseimage"
 #define VOLUME_NAME                            "apfs_sparse"
 #define DEFAULT_FSTYPE                 "JHFS+"
@@ -30,6 +35,9 @@
 #define DIFF_PATH                              "/usr/bin/diff"
 
 // Test routine helpers.
+bool verify_fd_xattr_contents(int orig_fd, int copy_fd);
+bool verify_st_flags(struct stat *sb, uint32_t flags_to_expect);
+bool verify_contents_with_buf(int orig_fd, off_t orig_pos, const char *expected, size_t length);
 bool verify_fd_contents(int orig_fd, off_t orig_pos, int copy_fd, off_t copy_pos, size_t length);
 bool verify_copy_contents(const char *orig_name, const char *copy_name);
 bool verify_copy_sizes(struct stat *orig_sb, struct stat *copy_sb, copyfile_state_t cpf_state,