Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Sep 2012 19:11:08 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r240944 - in head/tools/regression/net: . if_tap
Message-ID:  <CAGH67wQ6yv0pAxB=kU8o6CBAf=6otijCvBxzThhE674fum4rmQ@mail.gmail.com>
In-Reply-To: <CAPyFy2C5Yxr8a2nF09pCx6rmz898CYQ=PccwVi8qNketJ1c8KA@mail.gmail.com>
References:  <201209260025.q8Q0PAp0021186@svn.freebsd.org> <CAGH67wQDaSprjhCXGGLGtu8ggnM-0bk8x1fTezSd8ZFpghnAVQ@mail.gmail.com> <CAPyFy2C5Yxr8a2nF09pCx6rmz898CYQ=PccwVi8qNketJ1c8KA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 25, 2012 at 6:40 PM, Ed Maste <emaste@freebsd.org> wrote:
> On 25 September 2012 21:11, Garrett Cooper <yanegomi@gmail.com> wrote:
>> On Tue, Sep 25, 2012 at 5:25 PM, Ed Maste <emaste@freebsd.org> wrote:
>>> Author: emaste
>>> Date: Wed Sep 26 00:25:09 2012
>>> New Revision: 240944
>>> URL: http://svn.freebsd.org/changeset/base/240944
> ...
>>     This test is technically only valid if sysctl
>> kern.features.invariant_support == 1, right?
>
> It's only possible to prove that the bug described in kern/172075 is
> fixed if kern.features.invariant_support == 1, yes.  Without
> invariants though the test still verifies that a tap(4) device can be
> properly destroyed when open and not.
>
> I have another change coming that will cause cat(1) to terminate
> immediately when the device is destroyed, and this script will become
> a valid test of that behaviour with or without INVARIANTS.
>
> Ideally the script would report pass or fail for the individual tap(4)
> create and destroy invocations, and separately pass or unsupported for
> kern/172075 based on kern.features.invariant_support.  I'd like to
> figure out how to implement that once our test framework is in place.

Here's a basic /bin/sh based example for how to use ATF:
http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/user/gcooper/atf-head/src/tests/examples/sh_test/sh_test.sh&REV=2
. Please note that using a function like that won't work though unless
it's in a separate script as ATF forks a separate shell, and thus all
definitions not inlined in the atf_check `test` are lost (it's a
caveat that annoys me a small bit).

If you want me to CC you on the thread where gnn@ and marcel@ are
helping review the FreeBSD ATF porting work, please let me know!

Thanks!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wQ6yv0pAxB=kU8o6CBAf=6otijCvBxzThhE674fum4rmQ>