ZFS: fix several zvol_misc tests

* Adapt zvol_misc_001_neg to use dumpon instead of Solaris's dumpadm
* Disable zvol_misc_003_neg, zvol_misc_005_neg, and zvol_misc_006_pos,
  because they involve using a zvol as a dump device, which FreeBSD does not
  yet support.

MFC after:	2 weeks
Sponsored by:	Axcient
This commit is contained in:
Alan Somers 2019-10-07 18:21:33 +00:00
parent 4715738b12
commit ba23dca684
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353281
2 changed files with 7 additions and 9 deletions

View File

@ -44,7 +44,7 @@
#
# STRATEGY:
# 1. Create a ZFS volume
# 2. Use dumpadm add the volume as dump device
# 2. Use dumpon add the volume as dump device
# 3. Verify the return code as expected.
#
# TESTABILITY: explicit
@ -71,15 +71,10 @@ function cleanup
log_assert "Verify that ZFS volume cannot act as dump device until dumpswap supported."
log_onexit cleanup
test_requires DUMPADM
voldev=/dev/zvol/$TESTPOOL/$TESTVOL
savedumpdev=$(get_dumpdevice)
if ! is_dumpswap_supported $TESTPOOL ; then
log_mustnot $DUMPADM -d $voldev
else
safe_dumpadm $voldev
fi
# FreeBSD doesn't support using zvols as dump devices for any pool version
log_mustnot $DUMPON $voldev
log_pass "ZFS volume cannot act as dump device until dumpswap supported as expected."

View File

@ -30,7 +30,6 @@ atf_test_case zvol_misc_001_neg cleanup
zvol_misc_001_neg_head()
{
atf_set "descr" "Verify that ZFS volume cannot act as dump device until dumpswap supported."
atf_set "require.progs" dumpadm
}
zvol_misc_001_neg_body()
{
@ -82,6 +81,7 @@ zvol_misc_003_neg_head()
}
zvol_misc_003_neg_body()
{
atf_skip "FreeBSD does not yet support dumping to a zvol"
. $(atf_get_srcdir)/../../../include/default.cfg
. $(atf_get_srcdir)/zvol_misc.cfg
@ -106,6 +106,7 @@ zvol_misc_004_pos_head()
}
zvol_misc_004_pos_body()
{
atf_skip "FreeBSD does not yet support dumping to a zvol"
. $(atf_get_srcdir)/../../../include/default.cfg
. $(atf_get_srcdir)/zvol_misc.cfg
@ -130,6 +131,7 @@ zvol_misc_005_neg_head()
}
zvol_misc_005_neg_body()
{
atf_skip "FreeBSD does not yet support dumping to a zvol"
. $(atf_get_srcdir)/../../../include/default.cfg
. $(atf_get_srcdir)/zvol_misc.cfg
@ -154,6 +156,7 @@ zvol_misc_006_pos_head()
}
zvol_misc_006_pos_body()
{
atf_skip "FreeBSD does not yet support dumping to a zvol"
. $(atf_get_srcdir)/../../../include/default.cfg
. $(atf_get_srcdir)/zvol_misc.cfg