On Mon, Sep 4, 2023 at 5:37 PM Dag-Erling Smørgrav <d...@freebsd.org> wrote:

> Warner Losh <i...@freebsd.org> writes:
> > diff --git a/tests/sys/cddl/zfs/tests/cache/cache_test.sh
> b/tests/sys/cddl/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
> >
> > +     [ -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.
>

Thanks for the tip. I'll redo this for the other ATF files. I have several
others in the queue...

I've not been good about sleuthing out these meta-data variables. Where's
the list of
them kept?

Also, is there a canonical way to say "I expect this result, except if I'm
in a jail, then I expect that result"?
There's a number of things we have tests for (like mknod) that work outside
a jail, but not inside. This
results in about 50 failures when kyua runs in a jail (which is my test
setup for bsd-user).

Warner

Reply via email to