Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/cddl/zfs/tests/snapshot/snapshot_test.sh
Show All 24 Lines | |||||
# Use is subject to license terms. | # Use is subject to license terms. | ||||
# | # | ||||
atf_test_case clone_001_pos cleanup | atf_test_case clone_001_pos cleanup | ||||
clone_001_pos_head() | clone_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify a cloned file system is writable." | atf_set "descr" "Verify a cloned file system is writable." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
clone_001_pos_body() | clone_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
verify_zvol_recursive | verify_zvol_recursive | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/clone_001_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/clone_001_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
clone_001_pos_cleanup() | clone_001_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case rollback_001_pos cleanup | atf_test_case rollback_001_pos cleanup | ||||
rollback_001_pos_head() | rollback_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that a rollback to a previous snapshot succeeds." | atf_set "descr" "Verify that a rollback to a previous snapshot succeeds." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
rollback_001_pos_body() | rollback_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/rollback_001_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/rollback_001_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
rollback_001_pos_cleanup() | rollback_001_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case rollback_002_pos cleanup | atf_test_case rollback_002_pos cleanup | ||||
rollback_002_pos_head() | rollback_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify rollback is with respect to latest snapshot." | atf_set "descr" "Verify rollback is with respect to latest snapshot." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
rollback_002_pos_body() | rollback_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/rollback_002_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/rollback_002_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
rollback_002_pos_cleanup() | rollback_002_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case rollback_003_pos cleanup | atf_test_case rollback_003_pos cleanup | ||||
rollback_003_pos_head() | rollback_003_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify rollback succeeds when there are nested file systems." | atf_set "descr" "Verify rollback succeeds when there are nested file systems." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
rollback_003_pos_body() | rollback_003_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/rollback_003_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/rollback_003_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
rollback_003_pos_cleanup() | rollback_003_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_001_pos cleanup | atf_test_case snapshot_001_pos cleanup | ||||
snapshot_001_pos_head() | snapshot_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify a file system snapshot is identical to original." | atf_set "descr" "Verify a file system snapshot is identical to original." | ||||
atf_set "require.progs" zfs sum | atf_set "require.progs" "ksh93 zfs sum" | ||||
} | } | ||||
snapshot_001_pos_body() | snapshot_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_001_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_001_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_001_pos_cleanup() | snapshot_001_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_002_pos cleanup | atf_test_case snapshot_002_pos cleanup | ||||
snapshot_002_pos_head() | snapshot_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify an archive of a file system is identical toan archive of its snapshot." | atf_set "descr" "Verify an archive of a file system is identical toan archive of its snapshot." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_002_pos_body() | snapshot_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_002_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_002_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_002_pos_cleanup() | snapshot_002_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_003_pos cleanup | atf_test_case snapshot_003_pos cleanup | ||||
snapshot_003_pos_head() | snapshot_003_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify many snapshots of a file system can be taken." | atf_set "descr" "Verify many snapshots of a file system can be taken." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_003_pos_body() | snapshot_003_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_003_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_003_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_003_pos_cleanup() | snapshot_003_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_004_pos cleanup | atf_test_case snapshot_004_pos cleanup | ||||
snapshot_004_pos_head() | snapshot_004_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that a snapshot of an empty file system remains empty." | atf_set "descr" "Verify that a snapshot of an empty file system remains empty." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_004_pos_body() | snapshot_004_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_004_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_004_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_004_pos_cleanup() | snapshot_004_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_005_pos cleanup | atf_test_case snapshot_005_pos cleanup | ||||
snapshot_005_pos_head() | snapshot_005_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that a snapshot of a dataset is identical tothe original dataset." | atf_set "descr" "Verify that a snapshot of a dataset is identical tothe original dataset." | ||||
atf_set "require.progs" zfs sum | atf_set "require.progs" "ksh93 zfs sum" | ||||
} | } | ||||
snapshot_005_pos_body() | snapshot_005_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_005_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_005_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_005_pos_cleanup() | snapshot_005_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_006_pos cleanup | atf_test_case snapshot_006_pos cleanup | ||||
snapshot_006_pos_head() | snapshot_006_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that an archive of a dataset is identical toan archive of the dataset's snapshot." | atf_set "descr" "Verify that an archive of a dataset is identical toan archive of the dataset's snapshot." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_006_pos_body() | snapshot_006_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_006_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_006_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_006_pos_cleanup() | snapshot_006_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_007_pos cleanup | atf_test_case snapshot_007_pos cleanup | ||||
snapshot_007_pos_head() | snapshot_007_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that many snapshots can be made on a zfs dataset." | atf_set "descr" "Verify that many snapshots can be made on a zfs dataset." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_007_pos_body() | snapshot_007_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_007_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_007_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_007_pos_cleanup() | snapshot_007_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_008_pos cleanup | atf_test_case snapshot_008_pos cleanup | ||||
snapshot_008_pos_head() | snapshot_008_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that destroying snapshots returns space to the pool." | atf_set "descr" "Verify that destroying snapshots returns space to the pool." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_008_pos_body() | snapshot_008_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_008_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_008_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_008_pos_cleanup() | snapshot_008_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_009_pos cleanup | atf_test_case snapshot_009_pos cleanup | ||||
snapshot_009_pos_head() | snapshot_009_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify snapshot -r can correctly create a snapshot tree." | atf_set "descr" "Verify snapshot -r can correctly create a snapshot tree." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_009_pos_body() | snapshot_009_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_009_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_009_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_009_pos_cleanup() | snapshot_009_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_010_pos cleanup | atf_test_case snapshot_010_pos cleanup | ||||
snapshot_010_pos_head() | snapshot_010_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify 'destroy -r' can correctly destroy a snapshot subtree at any point." | atf_set "descr" "Verify 'destroy -r' can correctly destroy a snapshot subtree at any point." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_010_pos_body() | snapshot_010_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_010_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_010_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_010_pos_cleanup() | snapshot_010_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_011_pos cleanup | atf_test_case snapshot_011_pos cleanup | ||||
snapshot_011_pos_head() | snapshot_011_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that rollback to a snapshot created by snapshot -r succeeds." | atf_set "descr" "Verify that rollback to a snapshot created by snapshot -r succeeds." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_011_pos_body() | snapshot_011_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_011_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_011_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_011_pos_cleanup() | snapshot_011_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_012_pos cleanup | atf_test_case snapshot_012_pos cleanup | ||||
snapshot_012_pos_head() | snapshot_012_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify that 'snapshot -r' can work with 'zfs promote'." | atf_set "descr" "Verify that 'snapshot -r' can work with 'zfs promote'." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_012_pos_body() | snapshot_012_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_012_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_012_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_012_pos_cleanup() | snapshot_012_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_013_pos cleanup | atf_test_case snapshot_013_pos cleanup | ||||
snapshot_013_pos_head() | snapshot_013_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify snapshots from 'snapshot -r' can be used for zfs send/recv" | atf_set "descr" "Verify snapshots from 'snapshot -r' can be used for zfs send/recv" | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_013_pos_body() | snapshot_013_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_013_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_013_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_013_pos_cleanup() | snapshot_013_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_014_pos cleanup | atf_test_case snapshot_014_pos cleanup | ||||
snapshot_014_pos_head() | snapshot_014_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify creating/destroying snapshots do things clean" | atf_set "descr" "Verify creating/destroying snapshots do things clean" | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_014_pos_body() | snapshot_014_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_014_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_014_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_014_pos_cleanup() | snapshot_014_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_015_pos cleanup | atf_test_case snapshot_015_pos cleanup | ||||
snapshot_015_pos_head() | snapshot_015_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify snapshot can be created via mkdir in .zfs/snapshot." | atf_set "descr" "Verify snapshot can be created via mkdir in .zfs/snapshot." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_015_pos_body() | snapshot_015_pos_body() | ||||
{ | { | ||||
atf_expect_fail "Not all directory operations on the .zfs/snapshot directory are yet supported by FreeBSD" | atf_expect_fail "Not all directory operations on the .zfs/snapshot directory are yet supported by FreeBSD" | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_015_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_015_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_015_pos_cleanup() | snapshot_015_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_016_pos cleanup | atf_test_case snapshot_016_pos cleanup | ||||
snapshot_016_pos_head() | snapshot_016_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify renamed snapshots via mv can be destroyed." | atf_set "descr" "Verify renamed snapshots via mv can be destroyed." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_016_pos_body() | snapshot_016_pos_body() | ||||
{ | { | ||||
atf_expect_fail "Not all directory operations on the .zfs/snapshot directory are yet supported by FreeBSD" | atf_expect_fail "Not all directory operations on the .zfs/snapshot directory are yet supported by FreeBSD" | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_016_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_016_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_016_pos_cleanup() | snapshot_016_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_017_pos cleanup | atf_test_case snapshot_017_pos cleanup | ||||
snapshot_017_pos_head() | snapshot_017_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Directory structure of snapshots reflects filesystem structure." | atf_set "descr" "Directory structure of snapshots reflects filesystem structure." | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_017_pos_body() | snapshot_017_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_017_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_017_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_017_pos_cleanup() | snapshot_017_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_018_pos cleanup | atf_test_case snapshot_018_pos cleanup | ||||
snapshot_018_pos_head() | snapshot_018_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Snapshot directory supports ACL operations" | atf_set "descr" "Snapshot directory supports ACL operations" | ||||
atf_set "require.progs" zfs getfacl getconf sha1 | atf_set "require.progs" "ksh93 zfs getfacl getconf sha1" | ||||
} | } | ||||
snapshot_018_pos_body() | snapshot_018_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_018_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_018_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_018_pos_cleanup() | snapshot_018_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_019_pos cleanup | atf_test_case snapshot_019_pos cleanup | ||||
snapshot_019_pos_head() | snapshot_019_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Accessing snapshots and unmounting them in parallel does not panic" | atf_set "descr" "Accessing snapshots and unmounting them in parallel does not panic" | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
atf_set "timeout" 1200 | atf_set "timeout" 1200 | ||||
} | } | ||||
snapshot_019_pos_body() | snapshot_019_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/snapshot_019_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/snapshot_019_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
snapshot_019_pos_cleanup() | snapshot_019_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case snapshot_020_pos cleanup | atf_test_case snapshot_020_pos cleanup | ||||
snapshot_020_pos_head() | snapshot_020_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify mounted snapshots can be renamed and destroyed" | atf_set "descr" "Verify mounted snapshots can be renamed and destroyed" | ||||
atf_set "require.progs" zfs | atf_set "require.progs" "ksh93 zfs" | ||||
} | } | ||||
snapshot_020_pos_body() | snapshot_020_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/snapshot.cfg | . $(atf_get_srcdir)/snapshot.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
Show All 38 Lines |