From owner-svn-src-head@FreeBSD.ORG Wed Sep 26 02:11:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61D971065670; Wed, 26 Sep 2012 02:11:10 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id DF5418FC16; Wed, 26 Sep 2012 02:11:09 +0000 (UTC) Received: by oagm1 with SMTP id m1so120209oag.13 for ; Tue, 25 Sep 2012 19:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QEmO540Ur8oAmH2NZRTRz/YIyMWzfmf2aBXzTFTHu/4=; b=xdOSHDr+YN9NVx+UNvCFvrU0EqQIPwd6Bxi7kp7nS/EMziZ6mOzHjnIQQMxE9NSf91 wxAcx2u3Sa/T4fwOI9g8nZJY48RJrVKZf7+rzrHy+j0JX03t15KXQg0FiC/AIMJXzLZ4 tVXlGCEuZOflvvLI/y/hffhGcnD8BSer5tSB5AGEBYp+Fk4E8mkzF28ZSWArmz3D4S1E 3CV6/t9e2v9wFfFtMSHflVSlQlvVsFyLp8jIReZ+ehUjI3HrHikNWf6AT7Rve4eDZrYa Q3aveZPe0BoAqluNR2+EpAmf55IYszMsisTMoNDjA57q1mqGLBfLFHdNt6E2k06YkWdn 2LgQ== MIME-Version: 1.0 Received: by 10.60.171.69 with SMTP id as5mr14260180oec.100.1348625468199; Tue, 25 Sep 2012 19:11:08 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Tue, 25 Sep 2012 19:11:08 -0700 (PDT) In-Reply-To: References: <201209260025.q8Q0PAp0021186@svn.freebsd.org> Date: Tue, 25 Sep 2012 19:11:08 -0700 Message-ID: From: Garrett Cooper To: Ed Maste Content-Type: text/plain; charset=ISO-8859-1 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2012 02:11:10 -0000 On Tue, Sep 25, 2012 at 6:40 PM, Ed Maste wrote: > On 25 September 2012 21:11, Garrett Cooper wrote: >> On Tue, Sep 25, 2012 at 5:25 PM, Ed Maste 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