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 <<a href=3D"mailto:des@freebsd.org">des@freeb= sd.org</a>> 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 <imp@FreeBSD.org> writes:<br> > diff --git a/tests/sys/cddl/zfs/tests/cache/cache_test.sh b/tests/sys/= cddl/zfs/tests/cache/cache_test.sh<br> > index 4d77d9fa56a7..79b09dd93183 100755<br> > --- a/tests/sys/cddl/zfs/tests/cache/cache_test.sh<br> > +++ b/tests/sys/cddl/zfs/tests/cache/cache_test.sh<br> > @@ -280,6 +280,7 @@ cache_010_neg_body()<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0. $(atf_get_srcdir)/cache.kshlib<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0. $(atf_get_srcdir)/cache.cfg<br> >=C2=A0 <br> > +=C2=A0 =C2=A0 =C2=A0[ -c /dev/mdctl ] || atf_skip "no /dev/mdctl= to create md devices"<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0verify_disk_count "$DISKS" 1<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0ksh93 $(atf_get_srcdir)/setup.ksh || atf_fai= l "Setup failed"<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0ksh93 $(atf_get_srcdir)/cache_010_neg.ksh ||= atf_fail "Testcase failed"<br> <br> the canonical way to do this would be to add<br> <br> =C2=A0 =C2=A0 atf_set "require.files" "/dev/mdctl"<br> <br> to the testcase head.<br></blockquote><div><br></div><div>Thanks for the ti= p. I'll redo this for the other ATF files. I have several others in the= queue...<br></div><div><br></div><div>I've not been good about sleuthi= ng out these meta-data variables. Where's the list of</div><div>them ke= pt?</div><div><br></div><div>Also, is there a canonical way to say "I = expect this result, except if I'm in a jail, then I expect that result&= quot;?</div><div>There'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>