Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/cddl/zfs/tests/hotplug/hotplug_test.sh
Show All 24 Lines | |||||
# Use is subject to license terms. | # Use is subject to license terms. | ||||
# | # | ||||
atf_test_case hotplug_001_pos cleanup | atf_test_case hotplug_001_pos cleanup | ||||
hotplug_001_pos_head() | hotplug_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "When removing a device from a redundant pool, the device'sstate will be indicated as 'REMOVED'." | atf_set "descr" "When removing a device from a redundant pool, the device'sstate will be indicated as 'REMOVED'." | ||||
atf_set "require.progs" zpool gnop | atf_set "require.progs" "ksh93 zpool gnop" | ||||
} | } | ||||
hotplug_001_pos_body() | hotplug_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotplug.kshlib | . $(atf_get_srcdir)/hotplug.kshlib | ||||
. $(atf_get_srcdir)/hotplug.cfg | . $(atf_get_srcdir)/hotplug.cfg | ||||
verify_disk_count "$DISKS" 4 | verify_disk_count "$DISKS" 4 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/hotplug_001_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/hotplug_001_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
hotplug_001_pos_cleanup() | hotplug_001_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotplug.kshlib | . $(atf_get_srcdir)/hotplug.kshlib | ||||
. $(atf_get_srcdir)/hotplug.cfg | . $(atf_get_srcdir)/hotplug.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotplug_008_pos cleanup | atf_test_case hotplug_008_pos cleanup | ||||
hotplug_008_pos_head() | hotplug_008_pos_head() | ||||
{ | { | ||||
atf_set "descr" "When removing hotspare device, verify device status is 'REMOVED'." | atf_set "descr" "When removing hotspare device, verify device status is 'REMOVED'." | ||||
atf_set "require.progs" zpool gnop | atf_set "require.progs" "ksh93 zpool gnop" | ||||
} | } | ||||
hotplug_008_pos_body() | hotplug_008_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotplug.kshlib | . $(atf_get_srcdir)/hotplug.kshlib | ||||
. $(atf_get_srcdir)/hotplug.cfg | . $(atf_get_srcdir)/hotplug.cfg | ||||
verify_disk_count "$DISKS" 4 | verify_disk_count "$DISKS" 4 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/hotplug_008_pos.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/hotplug_008_pos.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
hotplug_008_pos_cleanup() | hotplug_008_pos_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotplug.kshlib | . $(atf_get_srcdir)/hotplug.kshlib | ||||
. $(atf_get_srcdir)/hotplug.cfg | . $(atf_get_srcdir)/hotplug.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case hotplug_011_pos cleanup | atf_test_case hotplug_011_pos cleanup | ||||
hotplug_011_pos_head() | hotplug_011_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Removing device offlined, verify device status is UNAVAIL,when the system is onlined." | atf_set "descr" "Removing device offlined, verify device status is UNAVAIL,when the system is onlined." | ||||
atf_set "require.progs" zpool gnop | atf_set "require.progs" "ksh93 zpool gnop" | ||||
} | } | ||||
hotplug_011_pos_body() | hotplug_011_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/hotplug.kshlib | . $(atf_get_srcdir)/hotplug.kshlib | ||||
. $(atf_get_srcdir)/hotplug.cfg | . $(atf_get_srcdir)/hotplug.cfg | ||||
verify_disk_count "$DISKS" 4 | verify_disk_count "$DISKS" 4 | ||||
Show All 20 Lines |