1*00b67f09SDavid van Moolenbroek.\" $NetBSD: atf-test-program.1,v 1.3 2014/12/10 04:38:04 christos Exp $ 2*00b67f09SDavid van Moolenbroek.\" 3*00b67f09SDavid van Moolenbroek.\" 4*00b67f09SDavid van Moolenbroek.\" Automated Testing Framework (atf) 5*00b67f09SDavid van Moolenbroek.\" 6*00b67f09SDavid van Moolenbroek.\" Copyright (c) 2007 The NetBSD Foundation, Inc. 7*00b67f09SDavid van Moolenbroek.\" All rights reserved. 8*00b67f09SDavid van Moolenbroek.\" 9*00b67f09SDavid van Moolenbroek.\" Redistribution and use in source and binary forms, with or without 10*00b67f09SDavid van Moolenbroek.\" modification, are permitted provided that the following conditions 11*00b67f09SDavid van Moolenbroek.\" are met: 12*00b67f09SDavid van Moolenbroek.\" 1. Redistributions of source code must retain the above copyright 13*00b67f09SDavid van Moolenbroek.\" notice, this list of conditions and the following disclaimer. 14*00b67f09SDavid van Moolenbroek.\" 2. Redistributions in binary form must reproduce the above copyright 15*00b67f09SDavid van Moolenbroek.\" notice, this list of conditions and the following disclaimer in the 16*00b67f09SDavid van Moolenbroek.\" documentation and/or other materials provided with the distribution. 17*00b67f09SDavid van Moolenbroek.\" 18*00b67f09SDavid van Moolenbroek.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 19*00b67f09SDavid van Moolenbroek.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 20*00b67f09SDavid van Moolenbroek.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21*00b67f09SDavid van Moolenbroek.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22*00b67f09SDavid van Moolenbroek.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 23*00b67f09SDavid van Moolenbroek.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24*00b67f09SDavid van Moolenbroek.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 25*00b67f09SDavid van Moolenbroek.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26*00b67f09SDavid van Moolenbroek.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 27*00b67f09SDavid van Moolenbroek.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28*00b67f09SDavid van Moolenbroek.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 29*00b67f09SDavid van Moolenbroek.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30*00b67f09SDavid van Moolenbroek.\" 31*00b67f09SDavid van Moolenbroek.Dd February 6, 2011 32*00b67f09SDavid van Moolenbroek.Dt ATF-TEST-PROGRAM 1 33*00b67f09SDavid van Moolenbroek.Os 34*00b67f09SDavid van Moolenbroek.Sh NAME 35*00b67f09SDavid van Moolenbroek.Nm atf-test-program 36*00b67f09SDavid van Moolenbroek.Nd common interface to ATF test programs 37*00b67f09SDavid van Moolenbroek.Sh SYNOPSIS 38*00b67f09SDavid van Moolenbroek.Nm 39*00b67f09SDavid van Moolenbroek.Op Fl r Ar resfile 40*00b67f09SDavid van Moolenbroek.Op Fl s Ar srcdir 41*00b67f09SDavid van Moolenbroek.Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN 42*00b67f09SDavid van Moolenbroek.Ar test_case 43*00b67f09SDavid van Moolenbroek.Nm 44*00b67f09SDavid van Moolenbroek.Fl l 45*00b67f09SDavid van Moolenbroek.Sh DESCRIPTION 46*00b67f09SDavid van MoolenbroekTest programs written using the ATF libraries all share a common user 47*00b67f09SDavid van Moolenbroekinterface, which is what this manual page describes. 48*00b67f09SDavid van Moolenbroek.Em NOTE: There is no binary known as 49*00b67f09SDavid van Moolenbroek.Nm ; 50*00b67f09SDavid van Moolenbroek.Em what is described in this manual page is the command-line interface 51*00b67f09SDavid van Moolenbroek.Em exposed by the atf-c, atf-c++ and atf-sh bindings . 52*00b67f09SDavid van Moolenbroek.Pp 53*00b67f09SDavid van MoolenbroekIn the first synopsis form, the test program will execute the provided 54*00b67f09SDavid van Moolenbroektest case and print its results to the standard output, unless otherwise 55*00b67f09SDavid van Moolenbroekstated by the 56*00b67f09SDavid van Moolenbroek.Fl r 57*00b67f09SDavid van Moolenbroekflag. 58*00b67f09SDavid van MoolenbroekOptionally, the test case name can be suffixed by 59*00b67f09SDavid van Moolenbroek.Sq :cleanup , 60*00b67f09SDavid van Moolenbroekin which case the cleanup routine of the test case will be executed 61*00b67f09SDavid van Moolenbroekinstead of the test case body; see 62*00b67f09SDavid van Moolenbroek.Xr atf-test-case 4 . 63*00b67f09SDavid van MoolenbroekNote that the test case is 64*00b67f09SDavid van Moolenbroek.Em executed without isolation , 65*00b67f09SDavid van Moolenbroekso it can and probably will create and modify files in the current directory. 66*00b67f09SDavid van MoolenbroekTo execute test cases in a controller manner, refer to 67*00b67f09SDavid van Moolenbroek.Xr atf-run 1 , 68*00b67f09SDavid van Moolenbroekwhich is the preferred way to run test cases. 69*00b67f09SDavid van MoolenbroekYou should only execute test cases by hand for debugging purposes. 70*00b67f09SDavid van Moolenbroek.Pp 71*00b67f09SDavid van MoolenbroekIn the second synopsis form, the test program will list all available 72*00b67f09SDavid van Moolenbroektest cases alongside their meta-data properties in a format that is 73*00b67f09SDavid van Moolenbroekmachine parseable. 74*00b67f09SDavid van MoolenbroekThis list is processed by 75*00b67f09SDavid van Moolenbroek.Xr atf-run 1 76*00b67f09SDavid van Moolenbroekto know how to execute the test cases of a given test program. 77*00b67f09SDavid van Moolenbroek.Pp 78*00b67f09SDavid van MoolenbroekThe following options are available: 79*00b67f09SDavid van Moolenbroek.Bl -tag -width XvXvarXvalueXX 80*00b67f09SDavid van Moolenbroek.It Fl l 81*00b67f09SDavid van MoolenbroekLists available test cases alongside a brief description for each of them. 82*00b67f09SDavid van Moolenbroek.It Fl r Ar resfile 83*00b67f09SDavid van MoolenbroekSpecifies the file that will receive the test case result. 84*00b67f09SDavid van MoolenbroekIf not specified, the test case prints its results to stdout. 85*00b67f09SDavid van MoolenbroekIf the result of a test case needs to be parsed by another program, you must 86*00b67f09SDavid van Moolenbroekuse this option to redirect the result to a file and then read the resulting 87*00b67f09SDavid van Moolenbroekfile from the other program. 88*00b67f09SDavid van MoolenbroekNote: 89*00b67f09SDavid van Moolenbroek.Em do not try to process the stdout of the test case 90*00b67f09SDavid van Moolenbroekbecause your program may break in the future. 91*00b67f09SDavid van Moolenbroek.It Fl s Ar srcdir 92*00b67f09SDavid van MoolenbroekThe path to the directory where the test program is located. 93*00b67f09SDavid van MoolenbroekThis is needed in all cases, except when the test program is being executed 94*00b67f09SDavid van Moolenbroekfrom the current directory. 95*00b67f09SDavid van MoolenbroekThe test program will use this path to locate any helper data files or 96*00b67f09SDavid van Moolenbroekutilities. 97*00b67f09SDavid van Moolenbroek.It Fl v Ar var=value 98*00b67f09SDavid van MoolenbroekSets the configuration variable 99*00b67f09SDavid van Moolenbroek.Ar var 100*00b67f09SDavid van Moolenbroekto the value 101*00b67f09SDavid van Moolenbroek.Ar value . 102*00b67f09SDavid van Moolenbroek.El 103*00b67f09SDavid van Moolenbroek.Sh SEE ALSO 104*00b67f09SDavid van Moolenbroek.Xr atf-run 1 , 105*00b67f09SDavid van Moolenbroek.Xr atf 7 106