Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | hotspare_add_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_add_002_pos cleanup | atf_test_case hotspare_add_002_pos cleanup | ||||
hotspare_add_002_pos_head() | hotspare_add_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool add <pool> spare <vdev> ...' can add devices to the pool while it has spare-in device." | atf_set "descr" "'zpool add <pool> spare <vdev> ...' can add devices to the pool while it has spare-in device." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_add_002_pos_body() | hotspare_add_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_add_002_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_add_003_neg cleanup | atf_test_case hotspare_add_003_neg cleanup | ||||
hotspare_add_003_neg_head() | hotspare_add_003_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool add [-f]' with hot spares should fail with inapplicable scenarios." | atf_set "descr" "'zpool add [-f]' with hot spares should fail with inapplicable scenarios." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_add_003_neg_body() | hotspare_add_003_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_add_003_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_add_004_neg cleanup | atf_test_case hotspare_add_004_neg cleanup | ||||
hotspare_add_004_neg_head() | hotspare_add_004_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool add [-f]' will not allow a swap device to be used as a hotspare'" | atf_set "descr" "'zpool add [-f]' will not allow a swap device to be used as a hotspare'" | ||||
atf_set "require.progs" zpool swapon swapoff swapctl | atf_set "require.progs" "ksh93 zpool swapon swapoff swapctl" | ||||
} | } | ||||
hotspare_add_004_neg_body() | hotspare_add_004_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
verify_disk_count "$DISKS" 2 | verify_disk_count "$DISKS" 2 | ||||
Show All 9 Lines | hotspare_add_004_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_clone_001_pos cleanup | atf_test_case hotspare_clone_001_pos cleanup | ||||
hotspare_clone_001_pos_head() | hotspare_clone_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool detach <pool> <vdev> ...' against hotspare should do no harm to clone." | atf_set "descr" "'zpool detach <pool> <vdev> ...' against hotspare should do no harm to clone." | ||||
atf_set "require.progs" zfs zpool sum | atf_set "require.progs" "ksh93 zfs zpool sum" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_clone_001_pos_body() | hotspare_clone_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_clone_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_clone_002_pos cleanup | atf_test_case hotspare_clone_002_pos cleanup | ||||
hotspare_clone_002_pos_head() | hotspare_clone_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool detach <pool> <vdev> ...' against basic vdev should do no harm to clone." | atf_set "descr" "'zpool detach <pool> <vdev> ...' against basic vdev should do no harm to clone." | ||||
atf_set "require.progs" zfs zpool sum | atf_set "require.progs" "ksh93 zfs zpool sum" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_clone_002_pos_body() | hotspare_clone_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_clone_002_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_create_001_neg cleanup | atf_test_case hotspare_create_001_neg cleanup | ||||
hotspare_create_001_neg_head() | hotspare_create_001_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool create [-f]' with hot spares should be failedwith inapplicable scenarios." | atf_set "descr" "'zpool create [-f]' with hot spares should be failedwith inapplicable scenarios." | ||||
atf_set "require.progs" dumpadm zpool | atf_set "require.progs" "ksh93 dumpadm zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_create_001_neg_body() | hotspare_create_001_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_create_001_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_detach_001_pos cleanup | atf_test_case hotspare_detach_001_pos cleanup | ||||
hotspare_detach_001_pos_head() | hotspare_detach_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool detach <pool> <vdev> ...' should deactivate the spared-in hot spare device successfully." | atf_set "descr" "'zpool detach <pool> <vdev> ...' should deactivate the spared-in hot spare device successfully." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_detach_001_pos_body() | hotspare_detach_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_detach_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_detach_002_pos cleanup | atf_test_case hotspare_detach_002_pos cleanup | ||||
hotspare_detach_002_pos_head() | hotspare_detach_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool detach <pool> <vdev> ...' against a functioning device that have spared should take the hot spare permanently swapping in successfully." | atf_set "descr" "'zpool detach <pool> <vdev> ...' against a functioning device that have spared should take the hot spare permanently swapping in successfully." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_detach_002_pos_body() | hotspare_detach_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_detach_002_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_detach_003_pos cleanup | atf_test_case hotspare_detach_003_pos cleanup | ||||
hotspare_detach_003_pos_head() | hotspare_detach_003_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool replace <pool> <vdev> <ndev>' against a functioning device that have spared should complete and the hot spare should return to available." | atf_set "descr" "'zpool replace <pool> <vdev> <ndev>' against a functioning device that have spared should complete and the hot spare should return to available." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_detach_003_pos_body() | hotspare_detach_003_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_detach_003_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_detach_004_pos cleanup | atf_test_case hotspare_detach_004_pos cleanup | ||||
hotspare_detach_004_pos_head() | hotspare_detach_004_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool replace <pool> <vdev> <ndev>' against a hot spare device that have been activated should successful while the another dev is a available hot spare." | atf_set "descr" "'zpool replace <pool> <vdev> <ndev>' against a hot spare device that have been activated should successful while the another dev is a available hot spare." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_detach_004_pos_body() | hotspare_detach_004_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_detach_004_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_detach_005_neg cleanup | atf_test_case hotspare_detach_005_neg cleanup | ||||
hotspare_detach_005_neg_head() | hotspare_detach_005_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool detach <pool> <vdev>' against a hot spare device that NOT activated should fail and issue an error message." | atf_set "descr" "'zpool detach <pool> <vdev>' against a hot spare device that NOT activated should fail and issue an error message." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_detach_005_neg_body() | hotspare_detach_005_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_detach_005_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_export_001_neg cleanup | atf_test_case hotspare_export_001_neg cleanup | ||||
hotspare_export_001_neg_head() | hotspare_export_001_neg_head() | ||||
{ | { | ||||
atf_set "descr" "export pool that using shared hotspares will fail" | atf_set "descr" "export pool that using shared hotspares will fail" | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_export_001_neg_body() | hotspare_export_001_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_export_001_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_import_001_pos cleanup | atf_test_case hotspare_import_001_pos cleanup | ||||
hotspare_import_001_pos_head() | hotspare_import_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool export/import <pool>' should runs successfully regardless the hotspare is only in list, activated, or offline." | atf_set "descr" "'zpool export/import <pool>' should runs successfully regardless the hotspare is only in list, activated, or offline." | ||||
atf_set "require.progs" zpool sum | atf_set "require.progs" "ksh93 zpool sum" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_import_001_pos_body() | hotspare_import_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_import_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_onoffline_003_neg cleanup | atf_test_case hotspare_onoffline_003_neg cleanup | ||||
hotspare_onoffline_003_neg_head() | hotspare_onoffline_003_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool offline/online <pool> <vdev>' should fail on inactive spares" | atf_set "descr" "'zpool offline/online <pool> <vdev>' should fail on inactive spares" | ||||
atf_set "require.progs" zpool zdb | atf_set "require.progs" "ksh93 zpool zdb" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_onoffline_003_neg_body() | hotspare_onoffline_003_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_onoffline_003_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_onoffline_004_neg cleanup | atf_test_case hotspare_onoffline_004_neg cleanup | ||||
hotspare_onoffline_004_neg_head() | hotspare_onoffline_004_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool offline/online <pool> <vdev>' against a spared basic vdev during I/O completes." | atf_set "descr" "'zpool offline/online <pool> <vdev>' against a spared basic vdev during I/O completes." | ||||
atf_set "require.progs" zfs zpool zdb | atf_set "require.progs" "ksh93 zfs zpool zdb" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_onoffline_004_neg_body() | hotspare_onoffline_004_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_onoffline_004_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_remove_001_pos cleanup | atf_test_case hotspare_remove_001_pos cleanup | ||||
hotspare_remove_001_pos_head() | hotspare_remove_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool remove <pool> <vdev> ...' can remove spare device from the pool." | atf_set "descr" "'zpool remove <pool> <vdev> ...' can remove spare device from the pool." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_remove_001_pos_body() | hotspare_remove_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_remove_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_remove_002_neg cleanup | atf_test_case hotspare_remove_002_neg cleanup | ||||
hotspare_remove_002_neg_head() | hotspare_remove_002_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool remove <pool> <vdev> ...' should fail with inapplicable scenarios." | atf_set "descr" "'zpool remove <pool> <vdev> ...' should fail with inapplicable scenarios." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_remove_002_neg_body() | hotspare_remove_002_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_remove_002_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_remove_003_neg cleanup | atf_test_case hotspare_remove_003_neg cleanup | ||||
hotspare_remove_003_neg_head() | hotspare_remove_003_neg_head() | ||||
{ | { | ||||
atf_set "descr" "Executing 'zpool remove' with bad options fails" | atf_set "descr" "Executing 'zpool remove' with bad options fails" | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_remove_003_neg_body() | hotspare_remove_003_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_remove_003_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_remove_004_pos cleanup | atf_test_case hotspare_remove_004_pos cleanup | ||||
hotspare_remove_004_pos_head() | hotspare_remove_004_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool remove <pool> <vdev> ...' can remove spare device from the pool." | atf_set "descr" "'zpool remove <pool> <vdev> ...' can remove spare device from the pool." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_remove_004_pos_body() | hotspare_remove_004_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_remove_004_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_replace_001_neg cleanup | atf_test_case hotspare_replace_001_neg cleanup | ||||
hotspare_replace_001_neg_head() | hotspare_replace_001_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool replace <pool> <odev> <ndev>' should fail with inapplicable scenarios." | atf_set "descr" "'zpool replace <pool> <odev> <ndev>' should fail with inapplicable scenarios." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_replace_001_neg_body() | hotspare_replace_001_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_replace_001_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_replace_002_neg cleanup | atf_test_case hotspare_replace_002_neg cleanup | ||||
hotspare_replace_002_neg_head() | hotspare_replace_002_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool replace <pool> <odev> <ndev>' should fail while the hot spares smaller than the basic vdev." | atf_set "descr" "'zpool replace <pool> <odev> <ndev>' should fail while the hot spares smaller than the basic vdev." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_replace_002_neg_body() | hotspare_replace_002_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_replace_002_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_scrub_001_pos cleanup | atf_test_case hotspare_scrub_001_pos cleanup | ||||
hotspare_scrub_001_pos_head() | hotspare_scrub_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool scrub <pool>' should runs successfully regardlessthe hotspare is only in list or activated." | atf_set "descr" "'zpool scrub <pool>' should runs successfully regardlessthe hotspare is only in list or activated." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_scrub_001_pos_body() | hotspare_scrub_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_scrub_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_scrub_002_pos cleanup | atf_test_case hotspare_scrub_002_pos cleanup | ||||
hotspare_scrub_002_pos_head() | hotspare_scrub_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool scrub' scans spare vdevs" | atf_set "descr" "'zpool scrub' scans spare vdevs" | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
} | } | ||||
hotspare_scrub_002_pos_body() | hotspare_scrub_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
atf_expect_fail "PR 241069 scrub does not detect all errors on active spares" | atf_expect_fail "PR 241069 scrub does not detect all errors on active spares" | ||||
Show All 9 Lines | hotspare_scrub_002_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_shared_001_pos cleanup | atf_test_case hotspare_shared_001_pos cleanup | ||||
hotspare_shared_001_pos_head() | hotspare_shared_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool add <pool> spare <vdev> ...' can add a disk as a shared spare to multiple pools." | atf_set "descr" "'zpool add <pool> spare <vdev> ...' can add a disk as a shared spare to multiple pools." | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_shared_001_pos_body() | hotspare_shared_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 10 Lines | hotspare_shared_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_snapshot_001_pos cleanup | atf_test_case hotspare_snapshot_001_pos cleanup | ||||
hotspare_snapshot_001_pos_head() | hotspare_snapshot_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool detach <pool> <vdev> ...' against hotspare should do no harm to snapshot." | atf_set "descr" "'zpool detach <pool> <vdev> ...' against hotspare should do no harm to snapshot." | ||||
atf_set "require.progs" zfs zpool sum | atf_set "require.progs" "ksh93 zfs zpool sum" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_snapshot_001_pos_body() | hotspare_snapshot_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
Show All 9 Lines | hotspare_snapshot_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotspare_snapshot_002_pos cleanup | atf_test_case hotspare_snapshot_002_pos cleanup | ||||
hotspare_snapshot_002_pos_head() | hotspare_snapshot_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool detach <pool> <vdev> ...' against basic vdev do no harm to snapshot." | atf_set "descr" "'zpool detach <pool> <vdev> ...' against basic vdev do no harm to snapshot." | ||||
atf_set "require.progs" zfs zpool sum | atf_set "require.progs" "ksh93 zfs zpool sum" | ||||
atf_set "timeout" 3600 | atf_set "timeout" 3600 | ||||
} | } | ||||
hotspare_snapshot_002_pos_body() | hotspare_snapshot_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotspare.kshlib | . $(atf_get_srcdir)/hotspare.kshlib | ||||
. $(atf_get_srcdir)/hotspare.cfg | . $(atf_get_srcdir)/hotspare.cfg | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |