/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/bclone/ |
H A D | bclone_common.kshlib | 77 typeset -r clone=$2 80 typeset -r clone_checksum=$(xxh128digest $clone) 83 log_fail "Clone $clone is corrupted with file size $filesize" 130 typeset -r clone="${dstdir}/clone" 150 clonefile -f $original "${clone}-tmp" 153 # so just do one clone and take it from bcloneused. 159 rm -f "${clone}-tmp" 178 # Create a first clone of the entire file. 179 clonefile -f $original "${clone}0" 180 # Try to clone the clone in the same transaction group. [all …]
|
H A D | bclone_corner_cases.kshlib | 53 export CLONE="$dstdir/clone0" 80 dd if=$CLONE of=/dev/null bs=$RECORDSIZE 2>/dev/null 98 log_must truncate_test -s $HALFRECORDSIZE -f $CLONE 101 log_must truncate_test -s $RECORDSIZE -f $CLONE 104 log_must dd if=/dev/urandom of=$CLONE bs=$HALFRECORDSIZE count=1 \ 108 log_must dd if=/dev/urandom of=$CLONE bs=$RECORDSIZE count=1 2>/dev/null 118 typeset -r clone=$1 121 case "$clone" in 125 clonefile -f $file $CLONE 141 log_fail "invalid clone: $clone" [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redacted_send/ |
H A D | redacted_contents.ksh | 27 # 3. A file removed in the clone redacts the whole file. 28 # 4. A file moved in the clone does not redact the file. 29 # 5. A copied, then removed file in the clone redacts the whole file. 39 typeset clone="$POOL/${ds_name}_clone" 43 typeset clone_mnt="$(get_prop mountpoint $clone)" 50 log_must zfs snapshot $clone@snap1 51 log_must zfs redact $sendfs@snap book1 $clone@snap1 57 log_must zfs rollback -R $clone@snap 60 # Removing a file in the clone redacts the entire file. 62 log_must zfs snapshot $clone@snap1 [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/removal/ |
H A D | removal_nopwrite.ksh | 58 log_must zfs clone $origin@a $origin/clone 63 log_must zfs set copies=1 $origin/clone 64 log_must zfs set recordsize=8k $origin/clone 65 dd if=/$TESTDIR/file_8k of=/$TESTDIR/clone/file_8k bs=1024k \ 67 log_must verify_nopwrite $origin $origin@a $origin/clone 68 log_must zfs set copies=3 $origin/clone 69 dd if=/$TESTDIR/file_8k_copies of=/$TESTDIR/clone/file_8k_copies bs=1024k \ 71 log_must verify_nopwrite $origin $origin@a $origin/clone 73 log_must zfs set copies=1 $origin/clone 74 log_must zfs set recordsize=128k $origin/clone [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/nopwrite/ |
H A D | nopwrite_mtime.ksh | 26 # 1. Create a clone with nopwrite enabled. 27 # 2. Write to the file in that clone and verify the mtime and ctime change, 48 log_must zfs clone $origin@a $origin/clone 51 o_atime=$(stat -c %X $TESTDIR/clone/file) 52 o_ctime=$(stat -c %Z $TESTDIR/clone/file) 53 o_mtime=$(stat -c %Y $TESTDIR/clone/file) 55 o_atime=$(stat -f "%a" $TESTDIR/clone/file) 56 o_ctime=$(stat -f "%c" $TESTDIR/clone/file) 57 o_mtime=$(stat -f "%m" $TESTDIR/clone/file) 59 o_atime=$(ls -E% all $TESTDIR/clone/file | awk '/atime/ {print $4}') [all …]
|
H A D | nopwrite_negative.ksh | 23 # Verify that duplicate writes to a clone are accounted as new data if the 29 # 3. The clone does not have compression. 30 # 4. The clone does not have the appropriate checksum. 49 log_must zfs clone -o compress=on $origin@a $origin/clone 50 log_must zfs set checksum=sha256 $origin/clone 51 dd if=/$TESTDIR/file of=/$TESTDIR/clone/file bs=1024k count=$MEGS \ 53 log_mustnot verify_nopwrite $origin $origin@a $origin/clone 63 log_must zfs clone $origin@a $origin/clone 64 dd if=/$TESTDIR/file of=/$TESTDIR/clone/file bs=1024k count=$MEGS \ 66 log_mustnot verify_nopwrite $origin $origin@a $origin/clone [all …]
|
H A D | nopwrite_promoted_clone.ksh | 23 # Verify that nopwrite still works for a dataset that becomes a clone via 27 # 1. Create a clone suitable for nopwrite. 28 # 2. Disable compression and checksum on the clone, and promote it. 29 # 3. Overwrite the file in the clone (former origin fs) and verify it 39 datasetexists $origin && destroy_dataset $TESTPOOL/clone -R 43 log_assert "nopwrite works on a dataset that becomes a clone via promotion." 50 log_must zfs clone $origin@a $TESTPOOL/clone 51 log_must zfs set compress=off $TESTPOOL/clone 52 log_must zfs set checksum=off $TESTPOOL/clone 53 log_must zfs promote $TESTPOOL/clone [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/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 47 log_must zfs destroy $TESTPOOL/$TESTFS/clone 52 log_assert "read/write/create/delete xattr on a clone filesystem" 59 # snapshot & clone the filesystem 61 log_must zfs clone $TESTPOOL/$TESTFS@snapshot1 $TESTPOOL/$TESTFS/clone 62 log_must zfs set mountpoint=$TESTDIR/clone $TESTPOOL/$TESTFS/clone 64 # check for the xattrs on the clone 65 verify_xattr $TESTDIR/clone/myfile.$$ passwd /etc/passwd [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 | 22 # 1. One clone with an empty livelist 23 # - create the clone, check that livelist exists 24 # - delete the clone, check that livelist is eventually 26 # 2. One clone with populated livelist 27 # - create the clone, check that livelist exists 28 # - write multiple files to the clone 29 # - delete the clone, check that livelist is eventually 35 # 5. Clone of clone with populated livelists with promote 130 log_must zfs clone $TESTPOOL/fs@snap $TESTPOOL/clone 131 log_must dd if=/dev/zero of=/$TESTPOOL/clone/clonefile bs=128k count=10 [all …]
|
H A D | zfs_destroy_003_pos.ksh | 42 # 3. Create clone in the second dataset for the snapshot in the first dataset 43 # 4. Verify 'zfs destroy -r' fails to destroy dataset with clone outside it 44 # 5. Verify 'zfs destroy -R' succeeds to destroy dataset with clone outside it 45 # 6. Verify 'zfs destroy -r' succeeds to destroy dataset without clone outside it. 121 for clone in $child_fs_snap_clone $child_fs_snap_clone1; do 122 log_must zfs clone $child_fs_snap $clone 126 for clone in $child_fs1_snap_clone $child_fs1_snap_clone1; do 127 log_must zfs clone $child_fs1_snap $clone 131 "with dependent clone outside it." 137 "clone outside the hierarchy." [all …]
|
H A D | zfs_destroy_007_neg.ksh | 42 # 2. Create a namespace-parent of origin clone. 43 # 3. Promote this clone 54 datasetexists $clone && destroy_dataset $clone 61 # Define variable $fssnap & and namespace-parent of origin clone. 64 clone=$fs/clone 65 clonesnap=$fs/clone@snap 71 log_must zfs clone $fssnap $clone 72 log_must zfs promote $clone 74 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 | 40 # 1. Create multiple snapshots and a clone to a middle point snapshot 41 # 2. Promote the clone filesystem 43 # correct datasets separated by the clone point. 69 clone=$TESTPOOL/$TESTCLONE 75 # Array which stores the snapshots existing in the clone after promote operation 76 set -A csnap "${clone}@$TESTSNAP" "${clone}@$TESTSNAP1" "${clone}@$TESTSNAP2" \ 77 "${clone}@$TESTSNAP3" 85 csnapdir=/$clone/.zfs/snapshot 86 # The data which will exist in the snapshot of clone filesystem after promote 99 log_must zfs clone ${snap[2]} $clone [all …]
|
H A D | zfs_promote_004_pos.ksh | 41 # 2. Promote a clone filesystem 50 log_must zfs promote $clone 63 log_assert "'zfs promote' can deal with multi-level clone." 67 clone=$TESTPOOL/$TESTCLONE 74 # Array which stores the snapshots existing in the first clone 75 set -A csnap "${clone}@$TESTSNAP3" "${clone}@$TESTSNAP4" "${clone}@$TESTSNAP5" 76 # Array which stores the snapshots existing in the second clone after promote operation 82 # The data will inject into the first clone 85 # The data which will exist in the snapshot of the second clone filesystem after promote 99 log_must zfs clone ${snap[2]} $clone [all …]
|
H A D | zfs_promote_008_pos.ksh | 36 # 'zfs promote' can successfully promote a volume clone. 39 # 1. Create a volume clone 40 # 2. Promote the volume clone 55 log_assert "'zfs promote' can promote a volume clone." 60 clone=$TESTPOOL/volclone 61 csnap=$clone@$TESTSNAP 65 log_must zfs clone $snap $clone 68 log_must zfs promote $clone 79 origin_prop=$(get_prop origin $clone) 81 log_fail "The dependency of $clone is not correct." [all …]
|
H A D | zfs_promote_001_pos.ksh | 37 # 'zfs promote' can promote a clone filesystem to no longer be dependent 41 # 1. Create a snapshot and a clone of the snapshot 42 # 2. Promote the clone filesystem 94 log_assert "'zfs promote' can promote a clone filesystem." 102 clone=$TESTPOOL/$TESTCLONE 103 cfile=/$clone/$CLONEFILE 104 csnap=$clone@$TESTSNAP 105 csnapfile=/$clone/.zfs/snapshot/$TESTSNAP/$TESTFILE0 112 log_must zfs clone $snap $clone 115 log_must zfs promote $clone [all …]
|
H A D | zfs_promote_005_pos.ksh | 40 # 2. Create clone of fs. 41 # 3. Unmount fs, then verify 'zfs promote' clone still succeed. 49 datasetexists $clone && destroy_dataset $clone 52 if datasetexists $clone ; then 54 log_must zfs destroy $clone 63 clone=$TESTPOOL/$TESTCLONE 67 log_must zfs clone $fssnap $clone 69 log_must zfs promote $clone 70 log_must zfs unmount $clone
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapshot/ |
H A D | snapshot_012_pos.ksh | 37 # Verify 'snapshot -r' can create snapshot for promoted clone, and vice 38 # versa, a clone filesystem from the snapshot created by 'snapshot -r' 43 # 2. snapshot a filesystem and clone the snapshot 44 # 3. promote the clone 47 # 6. clone a snapshot from the snapshot tree 48 # 7. promote the clone 49 # 8. verify that the clone is promoted correctly. 63 if snapexists $clone@$TESTSNAP1; then 74 clone=$ctr/$TESTCLONE 79 snapctrclone=$clone@$TESTSNAP [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/delegate/ |
H A D | delegate_common.kshlib | 208 clone) 281 clone) 727 typeset clone=$basefs/cfs.$stamp 730 user_run $user zfs clone $snap $clone 731 if datasetexists $clone ; then 736 user_run $user zfs clone $snap $clone 738 if datasetexists $clone ; then 743 user_run $user zfs clone $snap $clone 745 if datasetexists $clone ; then 751 user_run $user zfs clone $snap $clone [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/reservation/ |
H A D | reservation_022_pos.ksh | 28 # 2) Snapshot and clone it, using clone -o refreservation=auto. 29 # 3) Verify that the clone has refreservation that matches the size predicted by 31 # 4) Snapshot this second volume and clone it, using clone -o 33 # 5) Verify that the second clone has refreservation that matches the size 62 # Clone it 63 snap=$vol@clone 65 log_must zfs clone -o refreservation=auto $snap $vol2 72 # Clone the thick provisioned volume 73 snap=$vol2@clone 75 log_must zfs clone -o refreservation=auto $snap $vol3 [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/ |
H A D | send_encrypted_hierarchy.ksh | 29 # 1. Create an encrypted filesystem with a clone and a child 32 # 4. Change the child to an encryption root and promote the clone 54 log_must zfs clone $POOL/$FS@snap $POOL/clone 68 log_must verify_encryption_root $POOL/clone $POOL/$FS 69 log_must verify_keylocation $POOL/clone "none" 70 log_must verify_origin $POOL/clone "$POOL/$FS@snap" 78 log_must zfs promote $POOL/clone 85 log_must verify_encryption_root $POOL/$FS $POOL/clone 87 log_must verify_origin $POOL/$FS "$POOL/clone@snap" 89 log_must verify_encryption_root $POOL/clone $POOL/clone [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 …]
|