Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Sep 2023 01:37:42 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Warner Losh <imp@FreeBSD.org>
Cc:        src-committers@FreeBSD.org,  dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: ea82362219ee - main - tests: Skip all tests that require mdconfig when /dev/mdctl missing
Message-ID:  <861qfdtsqh.fsf@ltc.des.no>
In-Reply-To: <202309021940.382Je6Hn028769@gitrepo.freebsd.org> (Warner Losh's message of "Sat, 2 Sep 2023 19:40:06 GMT")
References:  <202309021940.382Je6Hn028769@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@FreeBSD.org> writes:
> diff --git a/tests/sys/cddl/zfs/tests/cache/cache_test.sh b/tests/sys/cdd=
l/zfs/tests/cache/cache_test.sh
> index 4d77d9fa56a7..79b09dd93183 100755
> --- a/tests/sys/cddl/zfs/tests/cache/cache_test.sh
> +++ b/tests/sys/cddl/zfs/tests/cache/cache_test.sh
> @@ -280,6 +280,7 @@ cache_010_neg_body()
>  	. $(atf_get_srcdir)/cache.kshlib
>  	. $(atf_get_srcdir)/cache.cfg
>=20=20
> +	[ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices"
>  	verify_disk_count "$DISKS" 1
>  	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
>  	ksh93 $(atf_get_srcdir)/cache_010_neg.ksh || atf_fail "Testcase failed"

the canonical way to do this would be to add

    atf_set "require.files" "/dev/mdctl"

to the testcase head.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?861qfdtsqh.fsf>