/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/bclone/ |
H A D | bclone_common.kshlib | 71 typeset -r clone=$2 74 typeset -r clone_checksum=$(xxh128digest $clone) 77 log_fail "Clone $clone is corrupted with file size $filesize" 124 typeset -r clone="${dstdir}/clone" 144 clonefile -f $original "${clone}-tmp" 147 # so just do one clone and take it from bcloneused. 153 rm -f "${clone}-tmp" 172 # Create a first clone of the entire file. 173 clonefile -f $original "${clone}0" 174 # Try to clone the clone in the same transaction group. [all …]
|
H A D | bclone_corner_cases.kshlib | 54 export CLONE="$dstdir/clone0" 81 dd if=$CLONE of=/dev/null bs=$RECORDSIZE 2>/dev/null 99 log_must truncate_test -s $HALFRECORDSIZE -f $CLONE 102 log_must truncate_test -s $RECORDSIZE -f $CLONE 105 log_must dd if=/dev/urandom of=$CLONE bs=$HALFRECORDSIZE count=1 \ 109 log_must dd if=/dev/urandom of=$CLONE bs=$RECORDSIZE count=1 2>/dev/null 119 typeset -r clone=$1 122 case "$clone" in 126 clonefile -f $file $CLONE 142 log_fail "invalid clone: $clone" [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redacted_send/ |
H A D | redacted_contents.ksh | 28 # 3. A file removed in the clone redacts the whole file. 29 # 4. A file moved in the clone does not redact the file. 30 # 5. A copied, then removed file in the clone redacts the whole file. 40 typeset clone="$POOL/${ds_name}_clone" 44 typeset clone_mnt="$(get_prop mountpoint $clone)" 51 log_must zfs snapshot $clone@snap1 52 log_must zfs redact $sendfs@snap book1 $clone@snap1 58 log_must zfs rollback -R $clone@snap 61 # Removing a file in the clone redacts the entire file. 63 log_must zfs snapshot $clone@snap1 [all …]
|
/freebsd/sys/x86/acpica/ |
H A D | acpi_apm.c | 204 struct apm_clone_data *clone; in apm_create_clone() local 206 clone = malloc(sizeof(*clone), M_APMDEV, M_WAITOK); in apm_create_clone() 207 clone->cdev = dev; in apm_create_clone() 208 clone->acpi_sc = acpi_sc; in apm_create_clone() 209 clone->notify_status = APM_EV_NONE; in apm_create_clone() 210 bzero(&clone->sel_read, sizeof(clone->sel_read)); in apm_create_clone() 211 knlist_init_mtx(&clone->sel_read.si_note, &acpi_mutex); in apm_create_clone() 218 clone->flags = ACPI_EVF_DEVD | ACPI_EVF_WRITE; in apm_create_clone() 220 clone->flags = ACPI_EVF_NONE; in apm_create_clone() 223 STAILQ_INSERT_TAIL(&acpi_sc->apm_cdevs, clone, entries); in apm_create_clone() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/removal/ |
H A D | removal_nopwrite.ksh | 59 log_must zfs clone $origin@a $origin/clone 64 log_must zfs set copies=1 $origin/clone 65 log_must zfs set recordsize=8k $origin/clone 66 dd if=/$TESTDIR/file_8k of=/$TESTDIR/clone/file_8k bs=1024k \ 68 log_must verify_nopwrite $origin $origin@a $origin/clone 69 log_must zfs set copies=3 $origin/clone 70 dd if=/$TESTDIR/file_8k_copies of=/$TESTDIR/clone/file_8k_copies bs=1024k \ 72 log_must verify_nopwrite $origin $origin@a $origin/clone 74 log_must zfs set copies=1 $origin/clone 75 log_must zfs set recordsize=128k $origin/clone [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/nopwrite/ |
H A D | nopwrite_mtime.ksh | 27 # 1. Create a clone with nopwrite enabled. 28 # 2. Write to the file in that clone and verify the mtime and ctime change, 49 log_must zfs clone $origin@a $origin/clone 52 o_atime=$(stat -c %X $TESTDIR/clone/file) 53 o_ctime=$(stat -c %Z $TESTDIR/clone/file) 54 o_mtime=$(stat -c %Y $TESTDIR/clone/file) 56 o_atime=$(stat -f "%a" $TESTDIR/clone/file) 57 o_ctime=$(stat -f "%c" $TESTDIR/clone/file) 58 o_mtime=$(stat -f "%m" $TESTDIR/clone/file) 60 o_atime=$(ls -E% all $TESTDIR/clone/file | awk '/atime/ {print $4}') [all …]
|
H A D | nopwrite_negative.ksh | 24 # Verify that duplicate writes to a clone are accounted as new data if the 30 # 3. The clone does not have compression. 31 # 4. The clone does not have the appropriate checksum. 50 log_must zfs clone -o compress=on $origin@a $origin/clone 51 log_must zfs set checksum=sha256 $origin/clone 52 dd if=/$TESTDIR/file of=/$TESTDIR/clone/file bs=1024k count=$MEGS \ 54 log_mustnot verify_nopwrite $origin $origin@a $origin/clone 64 log_must zfs clone $origin@a $origin/clone 65 dd if=/$TESTDIR/file of=/$TESTDIR/clone/file bs=1024k count=$MEGS \ 67 log_mustnot verify_nopwrite $origin $origin@a $origin/clone [all …]
|
H A D | nopwrite_promoted_clone.ksh | 24 # Verify that nopwrite still works for a dataset that becomes a clone via 28 # 1. Create a clone suitable for nopwrite. 29 # 2. Disable compression and checksum on the clone, and promote it. 30 # 3. Overwrite the file in the clone (former origin fs) and verify it 40 datasetexists $origin && destroy_dataset $TESTPOOL/clone -R 44 log_assert "nopwrite works on a dataset that becomes a clone via promotion." 51 log_must zfs clone $origin@a $TESTPOOL/clone 52 log_must zfs set compress=off $TESTPOOL/clone 53 log_must zfs set checksum=off $TESTPOOL/clone 54 log_must zfs promote $TESTPOOL/clone [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/xattr/ |
H A D | xattr_005_pos.ksh | 36 # read/write/create/delete xattr on a clone filesystem 41 # 2. Snapshot the filesystem and clone it 43 # 4. Verify we can create new xattrs on new files created on the clone 48 log_must zfs destroy $TESTPOOL/$TESTFS/clone 53 log_assert "read/write/create/delete xattr on a clone filesystem" 60 # snapshot & clone the filesystem 62 log_must zfs clone $TESTPOOL/$TESTFS@snapshot1 $TESTPOOL/$TESTFS/clone 63 log_must zfs set mountpoint=$TESTDIR/clone $TESTPOOL/$TESTFS/clone 65 # check for the xattrs on the clone 66 verify_xattr $TESTDIR/clone/myfile.$$ passwd /etc/passwd [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/ |
H A D | send_encrypted_hierarchy.ksh | 30 # 1. Create an encrypted filesystem with a clone and a child 33 # 4. Change the child to an encryption root and promote the clone 55 log_must zfs clone $POOL/$FS@snap $POOL/clone 69 log_must verify_encryption_root $POOL2/clone $POOL2/$FS 70 log_must verify_keylocation $POOL2/clone "none" 71 log_must verify_origin $POOL2/clone "$POOL2/$FS@snap" 80 log_must zfs promote $POOL/clone 87 log_must verify_encryption_root $POOL/$FS $POOL/clone 89 log_must verify_origin $POOL/$FS "$POOL/clone@snap" 91 log_must verify_encryption_root $POOL/clone $POOL/clone [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/xattr/ |
H A D | xattr_005_pos.ksh | 35 # read/write/create/delete xattr on a clone filesystem 40 # 2. Snapshot the filesystem and clone it 42 # 4. Verify we can create new xattrs on new files created on the clone 56 log_must $ZFS destroy $TESTPOOL/$TESTFS/clone 61 log_assert "read/write/create/delete xattr on a clone filesystem" 68 # snapshot & clone the filesystem 70 log_must $ZFS clone $TESTPOOL/$TESTFS@snapshot1 $TESTPOOL/$TESTFS/clone 71 log_must $ZFS set mountpoint=$TESTDIR/clone $TESTPOOL/$TESTFS/clone 73 # check for the xattrs on the clone 74 verify_xattr $TESTDIR/clone/myfile.${TESTCASE_ID} passwd /etc/passwd [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/ |
H A D | zfs_destroy_clone_livelist.ksh | 23 # 1. One clone with an empty livelist 24 # - create the clone, check that livelist exists 25 # - delete the clone, check that livelist is eventually 27 # 2. One clone with populated livelist 28 # - create the clone, check that livelist exists 29 # - write multiple files to the clone 30 # - delete the clone, check that livelist is eventually 36 # 5. Clone of clone with populated livelists with promote 131 log_must zfs clone $TESTPOOL/fs@snap $TESTPOOL/clone 132 log_must dd if=/dev/zero of=/$TESTPOOL/clone/clonefile bs=128k count=10 [all …]
|
H A D | zfs_destroy_003_pos.ksh | 43 # 3. Create clone in the second dataset for the snapshot in the first dataset 44 # 4. Verify 'zfs destroy -r' fails to destroy dataset with clone outside it 45 # 5. Verify 'zfs destroy -R' succeeds to destroy dataset with clone outside it 46 # 6. Verify 'zfs destroy -r' succeeds to destroy dataset without clone outside it. 122 for clone in $child_fs_snap_clone $child_fs_snap_clone1; do 123 log_must zfs clone $child_fs_snap $clone 127 for clone in $child_fs1_snap_clone $child_fs1_snap_clone1; do 128 log_must zfs clone $child_fs1_snap $clone 132 "with dependent clone outside it." 138 "clone outside the hierarchy." [all …]
|
H A D | zfs_destroy_007_neg.ksh | 43 # 2. Create a namespace-parent of origin clone. 44 # 3. Promote this clone 55 datasetexists $clone && destroy_dataset $clone 62 # Define variable $fssnap & and namespace-parent of origin clone. 65 clone=$fs/clone 66 clonesnap=$fs/clone@snap 72 log_must zfs clone $fssnap $clone 73 log_must zfs promote $clone 75 log_mustnot_expect "$KEY_WORDS" zfs destroy $clone
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_promote/ |
H A D | zfs_promote_003_pos.ksh | 41 # 1. Create multiple snapshots and a clone to a middle point snapshot 42 # 2. Promote the clone filesystem 44 # correct datasets separated by the clone point. 70 clone=$TESTPOOL/$TESTCLONE 76 # Array which stores the snapshots existing in the clone after promote operation 77 set -A csnap "${clone}@$TESTSNAP" "${clone}@$TESTSNAP1" "${clone}@$TESTSNAP2" \ 78 "${clone}@$TESTSNAP3" 86 csnapdir=/$clone/.zfs/snapshot 87 # The data which will exist in the snapshot of clone filesystem after promote 100 log_must zfs clone ${snap[2]} $clone [all …]
|
H A D | zfs_promote_004_pos.ksh | 42 # 2. Promote a clone filesystem 51 log_must zfs promote $clone 64 log_assert "'zfs promote' can deal with multi-level clone." 68 clone=$TESTPOOL/$TESTCLONE 75 # Array which stores the snapshots existing in the first clone 76 set -A csnap "${clone}@$TESTSNAP3" "${clone}@$TESTSNAP4" "${clone}@$TESTSNAP5" 77 # Array which stores the snapshots existing in the second clone after promote operation 83 # The data will inject into the first clone 86 # The data which will exist in the snapshot of the second clone filesystem after promote 100 log_must zfs clone ${snap[2]} $clone [all …]
|
H A D | zfs_promote_008_pos.ksh | 37 # 'zfs promote' can successfully promote a volume clone. 40 # 1. Create a volume clone 41 # 2. Promote the volume clone 56 log_assert "'zfs promote' can promote a volume clone." 61 clone=$TESTPOOL/volclone 62 csnap=$clone@$TESTSNAP 66 log_must zfs clone $snap $clone 69 log_must zfs promote $clone 80 origin_prop=$(get_prop origin $clone) 82 log_fail "The dependency of $clone is not correct." [all …]
|
H A D | zfs_promote_001_pos.ksh | 38 # 'zfs promote' can promote a clone filesystem to no longer be dependent 42 # 1. Create a snapshot and a clone of the snapshot 43 # 2. Promote the clone filesystem 95 log_assert "'zfs promote' can promote a clone filesystem." 103 clone=$TESTPOOL/$TESTCLONE 104 cfile=/$clone/$CLONEFILE 105 csnap=$clone@$TESTSNAP 106 csnapfile=/$clone/.zfs/snapshot/$TESTSNAP/$TESTFILE0 113 log_must zfs clone $snap $clone 116 log_must zfs promote $clone [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapshot/ |
H A D | snapshot_012_pos.ksh | 38 # Verify 'snapshot -r' can create snapshot for promoted clone, and vice 39 # versa, a clone filesystem from the snapshot created by 'snapshot -r' 44 # 2. snapshot a filesystem and clone the snapshot 45 # 3. promote the clone 48 # 6. clone a snapshot from the snapshot tree 49 # 7. promote the clone 50 # 8. verify that the clone is promoted correctly. 64 if snapexists $clone@$TESTSNAP1; then 75 clone=$ctr/$TESTCLONE 80 snapctrclone=$clone@$TESTSNAP [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/delegate/ |
H A D | delegate_common.kshlib | 209 clone) 285 clone) 770 typeset clone=$basefs/cfs.$stamp 773 user_run $user zfs clone $snap $clone 774 if datasetexists $clone ; then 779 user_run $user zfs clone $snap $clone 781 if datasetexists $clone ; then 786 user_run $user zfs clone $snap $clone 788 if datasetexists $clone ; then 794 user_run $user zfs clone $snap $clone [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/ |
H A D | zfs_promote_003_pos.ksh | 38 # 1. Create multiple snapshots and a clone to a middle point snapshot 39 # 2. Promote the clone filesystem 41 # correct datasets separated by the clone point. 77 clone=$TESTPOOL/$TESTCLONE 83 # Array which stores the snapshots existing in the clone after promote operation 84 set -A csnap "${clone}@$TESTSNAP" "${clone}@$TESTSNAP1" "${clone}@$TESTSNAP2" \ 85 "${clone}@$TESTSNAP3" 93 csnapdir=/$clone/$(get_snapdir_name) 94 # The data which will exist in the snapshot of clone filesystem after promote 107 log_must $ZFS clone ${snap[2]} $clone [all …]
|
H A D | zfs_promote_004_pos.ksh | 39 # 2. Promote a clone filesystem 57 log_must $ZFS promote $clone 71 log_assert "'zfs promote' can deal with multi-level clone." 75 clone=$TESTPOOL/$TESTCLONE 82 # Array which stores the snapshots existing in the first clone 83 set -A csnap "${clone}@$TESTSNAP3" "${clone}@$TESTSNAP4" "${clone}@$TESTSNAP5" 84 # Array which stores the snapshots existing in the second clone after promote operation 90 # The data will inject into the first clone 93 # The data which will exist in the snapshot of the second clone filesystem after promote 107 log_must $ZFS clone ${snap[2]} $clone [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/reservation/ |
H A D | reservation_022_pos.ksh | 29 # 2) Snapshot and clone it, using clone -o refreservation=auto. 30 # 3) Verify that the clone has refreservation that matches the size predicted by 32 # 4) Snapshot this second volume and clone it, using clone -o 34 # 5) Verify that the second clone has refreservation that matches the size 63 # Clone it 64 snap=$vol@clone 66 log_must zfs clone -o refreservation=auto $snap $vol2 73 # Clone the thick provisioned volume 74 snap=$vol2@clone 76 log_must zfs clone -o refreservation=auto $snap $vol3 [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/snapshot/ |
H A D | snapshot_012_pos.ksh | 35 # Verify 'snapshot -r' can create snapshot for promoted clone, and vice 36 # versa, a clone filesystem from the snapshot created by 'snapshot -r' 41 # 2. snapshot a filesystem and clone the snapshot 42 # 3. promote the clone 45 # 6. clone a snapshot from the snapshot tree 46 # 7. promote the clone 47 # 8. verify that the clone is promoted correctly. 71 if snapexists $clone@$TESTSNAP1; then 82 clone=$ctr/$TESTCLONE 87 snapctrclone=$clone@$TESTSNAP [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/ |
H A D | zfs_destroy_003_pos.ksh | 40 # 3. Create clone in the second dataset for the snapshot in the first dataset 41 # 4. Verify 'zfs destroy -r' fails to destroy dataset with clone outside it 42 # 5. Verify 'zfs destroy -R' succeeds to destroy dataset with clone outside it 43 # 6. Verify 'zfs destroy -r' succeeds to destroy dataset without clone outside it. 129 for clone in $child_fs_snap_clone $child_fs_snap_clone1; do 130 log_must $ZFS clone $child_fs_snap $clone 134 for clone in $child_fs1_snap_clone $child_fs1_snap_clone1; do 135 log_must $ZFS clone $child_fs1_snap $clone 139 "with clone dependent outside it." 144 log_fail "'zfs destroy -r' fails to keep clone " \ [all …]
|