1 /*
   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2007 Sun Microsystems, Inc.        All rights reserved.
  24  * Use is subject to license terms.
  25  *
  26  */
  27 
  28 #ifndef _STF_H
  29 #define _STF_H
  30 
  31 #ifdef __cplusplus
  32 extern "C" {
  33 #endif
  34 
  35 #define STF_MAX_RESULTS 11
  36 
  37 /* result codes */
  38 #define STF_PASS 0
  39 #define STF_FAIL 1
  40 #define STF_UNRESOLVED  2
  41 #define STF_NOTINUSE    3
  42 #define STF_UNSUPPORTED 4
  43 #define STF_UNTESTED    5
  44 #define STF_UNINITIATED 6
  45 #define STF_NORESULT    7
  46 #define STF_WARNING     8
  47 #define STF_TIMED_OUT   9
  48 #define STF_OTHER       10
  49 
  50 /* result index for results totals array */
  51 /* so your test can say "++results[PASS_INDEX]" */
  52 #define PASS_INDEX              0
  53 #define FAIL_INDEX              1
  54 #define UNRESOLVED_INDEX        2
  55 #define NOTINUSE_INDEX          3
  56 #define UNSUPPORTED_INDEX       4
  57 #define UNTESTED_INDEX          5
  58 #define UNINITIATED_INDEX       6
  59 #define NORESULT_INDEX          7
  60 #define WARNING_INDEX           8
  61 #define TIMED_OUT_INDEX         9
  62 #define OTHER_INDEX             10
  63 
  64 /* character result names */
  65 static char *result_tbl[] = {
  66         "PASS",
  67         "FAIL",
  68         "UNRESOLVED",
  69         "NOTINUSE",
  70         "UNSUPPORTED",
  71         "UNTESTED",
  72         "UNINITIATED",
  73         "NORESULT",
  74         "WARNING",
  75         "TIMED_OUT",
  76         "OTHER"
  77 };
  78 
  79 /* function prototypes */
  80 
  81 void stf_jnl_env();
  82 void stf_jnl_start();
  83 void stf_jnl_end();
  84 void stf_jnl_testcase_start(char **);
  85 void stf_jnl_testcase_end(char [], int, int);
  86 void stf_jnl_assert_start(char *);
  87 void stf_jnl_assert_end(int);
  88 void stf_jnl_msg(char *);
  89 void stf_jnl_totals(char *, int *);
  90 
  91 /*
  92  * this was moved here per an RFE for use with the ldi testsuite though it is
  93  * still classified as a private interface--as journaling methods evolve it
  94  * may change
  95  */
  96 void stf_jnl_msg_pid(int, char *);
  97 
  98 #ifdef __cplusplus
  99 }
 100 #endif
 101 
 102 #endif /* _STF_H */