Differential D29066 Diff 85154 tests/sys/cddl/zfs/tests/cli_root/zpool_replace/zpool_replace_test.sh
Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/cddl/zfs/tests/cli_root/zpool_replace/zpool_replace_test.sh
Show All 24 Lines | |||||
# Use is subject to license terms. | # Use is subject to license terms. | ||||
# | # | ||||
atf_test_case zpool_replace_001_neg cleanup | atf_test_case zpool_replace_001_neg cleanup | ||||
zpool_replace_001_neg_head() | zpool_replace_001_neg_head() | ||||
{ | { | ||||
atf_set "descr" "Executing 'zpool replace' with bad options fails" | atf_set "descr" "Executing 'zpool replace' with bad options fails" | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
} | } | ||||
zpool_replace_001_neg_body() | zpool_replace_001_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../../include/default.cfg | . $(atf_get_srcdir)/../../../include/default.cfg | ||||
. $(atf_get_srcdir)/zpool_replace.cfg | . $(atf_get_srcdir)/zpool_replace.cfg | ||||
verify_disk_count "$DISKS" 2 | verify_disk_count "$DISKS" 2 | ||||
ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" | ||||
ksh93 $(atf_get_srcdir)/zpool_replace_001_neg.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/zpool_replace_001_neg.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
zpool_replace_001_neg_cleanup() | zpool_replace_001_neg_cleanup() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../../include/default.cfg | . $(atf_get_srcdir)/../../../include/default.cfg | ||||
. $(atf_get_srcdir)/zpool_replace.cfg | . $(atf_get_srcdir)/zpool_replace.cfg | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zpool_replace_002_neg cleanup | atf_test_case zpool_replace_002_neg cleanup | ||||
zpool_replace_002_neg_head() | zpool_replace_002_neg_head() | ||||
{ | { | ||||
atf_set "descr" "'zpool replace' should fail if the new device is too small" | atf_set "descr" "'zpool replace' should fail if the new device is too small" | ||||
atf_set "require.progs" zpool | atf_set "require.progs" "ksh93 zpool" | ||||
} | } | ||||
zpool_replace_002_neg_body() | zpool_replace_002_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../../include/default.cfg | . $(atf_get_srcdir)/../../../include/default.cfg | ||||
. $(atf_get_srcdir)/zpool_replace.cfg | . $(atf_get_srcdir)/zpool_replace.cfg | ||||
ksh93 $(atf_get_srcdir)/zpool_replace_002_neg.ksh || atf_fail "Testcase failed" | ksh93 $(atf_get_srcdir)/zpool_replace_002_neg.ksh || atf_fail "Testcase failed" | ||||
} | } | ||||
Show All 15 Lines |