1*00b67f09SDavid van Moolenbroek /* $NetBSD: driver.h,v 1.4 2014/12/10 04:37:53 christos Exp $ */ 2*00b67f09SDavid van Moolenbroek 3*00b67f09SDavid van Moolenbroek /* 4*00b67f09SDavid van Moolenbroek * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") 5*00b67f09SDavid van Moolenbroek * Copyright (C) 2000, 2001 Internet Software Consortium. 6*00b67f09SDavid van Moolenbroek * 7*00b67f09SDavid van Moolenbroek * Permission to use, copy, modify, and/or distribute this software for any 8*00b67f09SDavid van Moolenbroek * purpose with or without fee is hereby granted, provided that the above 9*00b67f09SDavid van Moolenbroek * copyright notice and this permission notice appear in all copies. 10*00b67f09SDavid van Moolenbroek * 11*00b67f09SDavid van Moolenbroek * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12*00b67f09SDavid van Moolenbroek * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13*00b67f09SDavid van Moolenbroek * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14*00b67f09SDavid van Moolenbroek * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15*00b67f09SDavid van Moolenbroek * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16*00b67f09SDavid van Moolenbroek * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*00b67f09SDavid van Moolenbroek * PERFORMANCE OF THIS SOFTWARE. 18*00b67f09SDavid van Moolenbroek */ 19*00b67f09SDavid van Moolenbroek 20*00b67f09SDavid van Moolenbroek /* Id: driver.h,v 1.8 2007/06/19 23:47:00 tbox Exp */ 21*00b67f09SDavid van Moolenbroek 22*00b67f09SDavid van Moolenbroek /* 23*00b67f09SDavid van Moolenbroek * PASSED and FAILED mean the particular test passed or failed. 24*00b67f09SDavid van Moolenbroek * 25*00b67f09SDavid van Moolenbroek * UNKNOWN means that for one reason or another, the test process itself 26*00b67f09SDavid van Moolenbroek * failed. For instance, missing files, error when parsing files or 27*00b67f09SDavid van Moolenbroek * IP addresses, etc. That is, the test itself is broken, not what is 28*00b67f09SDavid van Moolenbroek * being tested. 29*00b67f09SDavid van Moolenbroek * 30*00b67f09SDavid van Moolenbroek * UNTESTED means the test was unable to be run because a prerequisite test 31*00b67f09SDavid van Moolenbroek * failed, the test is disabled, or the test needs a system component 32*00b67f09SDavid van Moolenbroek * (for instance, Perl) and cannot run. 33*00b67f09SDavid van Moolenbroek */ 34*00b67f09SDavid van Moolenbroek typedef enum { 35*00b67f09SDavid van Moolenbroek PASSED = 0, 36*00b67f09SDavid van Moolenbroek FAILED = 1, 37*00b67f09SDavid van Moolenbroek UNKNOWN = 2, 38*00b67f09SDavid van Moolenbroek UNTESTED = 3 39*00b67f09SDavid van Moolenbroek } test_result_t; 40*00b67f09SDavid van Moolenbroek 41*00b67f09SDavid van Moolenbroek typedef test_result_t (*test_func_t)(void); 42*00b67f09SDavid van Moolenbroek 43*00b67f09SDavid van Moolenbroek typedef struct { 44*00b67f09SDavid van Moolenbroek const char *tag; 45*00b67f09SDavid van Moolenbroek const char *description; 46*00b67f09SDavid van Moolenbroek test_func_t func; 47*00b67f09SDavid van Moolenbroek } test_t; 48*00b67f09SDavid van Moolenbroek 49*00b67f09SDavid van Moolenbroek #define TESTDECL(name) test_result_t name(void) 50*00b67f09SDavid van Moolenbroek 51