Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Sep 2023 17:58:20 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= <des@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>, 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:  <CANCZdfr%2BLz-xkrwQ5ZmbNsR1gPtL9jA3Lvj%2B0d1L1ed8Hgc%2BXA@mail.gmail.com>
In-Reply-To: <861qfdtsqh.fsf@ltc.des.no>
References:  <202309021940.382Je6Hn028769@gitrepo.freebsd.org> <861qfdtsqh.fsf@ltc.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000009de140060491498f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 4, 2023 at 5:37=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav <des@freebs=
d.org> wrote:

> Warner Losh <imp@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

--0000000000009de140060491498f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, Sep 4, 2023 at 5:37=E2=80=AFP=
M Dag-Erling Sm=C3=B8rgrav &lt;<a href=3D"mailto:des@freebsd.org">des@freeb=
sd.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left=
:1ex">Warner Losh &lt;imp@FreeBSD.org&gt; writes:<br>
&gt; diff --git a/tests/sys/cddl/zfs/tests/cache/cache_test.sh b/tests/sys/=
cddl/zfs/tests/cache/cache_test.sh<br>
&gt; index 4d77d9fa56a7..79b09dd93183 100755<br>
&gt; --- a/tests/sys/cddl/zfs/tests/cache/cache_test.sh<br>
&gt; +++ b/tests/sys/cddl/zfs/tests/cache/cache_test.sh<br>
&gt; @@ -280,6 +280,7 @@ cache_010_neg_body()<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0. $(atf_get_srcdir)/cache.kshlib<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0. $(atf_get_srcdir)/cache.cfg<br>
&gt;=C2=A0 <br>
&gt; +=C2=A0 =C2=A0 =C2=A0[ -c /dev/mdctl ] || atf_skip &quot;no /dev/mdctl=
 to create md devices&quot;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0verify_disk_count &quot;$DISKS&quot; 1<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0ksh93 $(atf_get_srcdir)/setup.ksh || atf_fai=
l &quot;Setup failed&quot;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0ksh93 $(atf_get_srcdir)/cache_010_neg.ksh ||=
 atf_fail &quot;Testcase failed&quot;<br>
<br>
the canonical way to do this would be to add<br>
<br>
=C2=A0 =C2=A0 atf_set &quot;require.files&quot; &quot;/dev/mdctl&quot;<br>
<br>
to the testcase head.<br></blockquote><div><br></div><div>Thanks for the ti=
p. I&#39;ll redo this for the other ATF files. I have several others in the=
 queue...<br></div><div><br></div><div>I&#39;ve not been good about sleuthi=
ng out these meta-data variables. Where&#39;s the list of</div><div>them ke=
pt?</div><div><br></div><div>Also, is there a canonical way to say &quot;I =
expect this result, except if I&#39;m in a jail, then I expect that result&=
quot;?</div><div>There&#39;s a number of things we have tests for (like mkn=
od) that work outside a jail, but not inside. This</div><div>results in abo=
ut 50 failures when kyua runs in a jail (which is my test setup for bsd-use=
r).<br></div><div><br></div><div>Warner<br></div></div></div>

--0000000000009de140060491498f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr%2BLz-xkrwQ5ZmbNsR1gPtL9jA3Lvj%2B0d1L1ed8Hgc%2BXA>