From owner-freebsd-testing@FreeBSD.ORG Thu Mar 6 18:28:14 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CD1496 for ; Thu, 6 Mar 2014 18:28:14 +0000 (UTC) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [IPv6:2607:f8b0:400c:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1EB53935 for ; Thu, 6 Mar 2014 18:28:14 +0000 (UTC) Received: by mail-ve0-f171.google.com with SMTP id cz12so3101908veb.30 for ; Thu, 06 Mar 2014 10:28:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=CV+5nLZnuqed2f+3fW4lHsY/QU0+sWWOXnMRS/aJBwM=; b=KXmS7q/Syj4Y/fnnB9a0KfK7h9L8Phz9HRO3rWAeHpWujy1viXDtHdfhE4Lzh9G2Wo DZFZBv/lxBScQgYriO07yTPk6IFF1WrvW+YOhQJsXOMoKmBr8bPhJR55+1t6h1SHKOdx n0YuaWsV/6RIizxzPQfKY/ipqunk+xX+1nvkqfAHg1htC8ISZpy2w0oveRO7SmOIXUW8 D5amLvpSlA45OVpWxYx+f8xi3f0GU0myMl4dl5a+xD6p+JW48UCL2B7yaE+TAWvOUkn4 JwAB/tUG4Eo5KOJERTUS65QIigO5uqvjJ+IIG8HibjjSw27M1D/VVfiq3RDzi1C59D8V SpBw== MIME-Version: 1.0 X-Received: by 10.58.161.205 with SMTP id xu13mr6380781veb.4.1394130493231; Thu, 06 Mar 2014 10:28:13 -0800 (PST) Received: by 10.221.67.136 with HTTP; Thu, 6 Mar 2014 10:28:13 -0800 (PST) Date: Thu, 6 Mar 2014 10:28:13 -0800 Message-ID: Subject: Structure of ATF testcases (was "Test scenario for sysctl kern.maxfiles") From: Garrett Cooper To: Julio Merino Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-testing@freebsd.org" , kyua-discuss@googlegroups.com X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2014 18:28:14 -0000 On Thu, Mar 6, 2014 at 10:02 AM, Julio Merino wrote: > On Thu, Mar 6, 2014 at 12:45 PM, Alan Somers wrote: >> I suggest the more specific name "allow_sysctl_side_effects". As I >> continue to add tests, config variables like this will become more >> important. In particular, I have some tests that create and destroy >> zpools, some that can cause panics, some that load modules, etc. >> Before I can upstream all of them, we'll need to agree on a consistent >> set of config variables that control test case execution. I haven't >> put much thought into it yet. > > Sure; more granularity++. I haven't put any thought on this though so > please propose something :) > > Whatever we decide, 1) these variables need to be documented in > tests(7), 2) a ready-to-enable template in > ports/devel/kyua-cli/files/kyua.conf.in about them would be beneficial > and 3) src/projects/jmmv/autotest/ should switch these on. > >> How does NetBSD handle tests that have >> potentially harmful side effects? > > They don't AFAIK. The thing is that not that many tests have > side-effects because the majority of kernel-level tests use rump to > avoid this problem and be more reliable/deterministic. The few that > have side-effects have ad-hoc cleanup routines. Seems like another standalone tool should be developed to cleanup variables after exit per test and per test suite. Setup/cleanup in ATF doesn't seem to follow the model that many other testing frameworks do when it comes to executing testcases and managing setup/cleanup. I really wish things were like the JUnit/unittest model, i.e. - Test suite setup - For each testcase: - Run the testcase setup - If the setup passed, continue - Run the testcase - Run the testcase cleanup - Test suite teardown Thanks :)! -Garrett