17 \h'-\w'\\$1\ 'u'\\$1\ \c
33 .TH tvec-env 3 "11 March 2024" "Straylight/Edgeware" "mLib utilities library"
35 tvec-env \- test vector framework environments
64 .\" @tvec_releaseoutputs
67 .B "#include <mLib/tvec.h>"
78 .B "struct tvec_state {"
80 .B " struct tvec_config cfg;"
81 .B " struct tvec_reg *in, *out;"
82 .B " const struct tvec_test *test;"
85 .B "#define TVSF_SKIP ..."
86 .B "#define TVSF_ACTIVE ..."
87 .B "#define TVSF_OUTMASK ..."
88 .B "#define TVSF_OUTSHIFT ..."
89 .B "#define TVSF_XFAIL ..."
91 .ta \w'\fBtypedef int tvec_setvarfn('u
92 .BI "typedef int tvec_setvarfn(struct tvec_state *" tv ", const char *" var ,
93 .BI " const union tvec_regval *" rv ", void *" ctx );
94 .ta \w'\fBtypedef int tvec_envsetupfn('u
95 .BI "typedef void tvec_envsetupfn(struct tvec_state *" tv ,
96 .BI " const struct tvec_env *" env ,
97 .BI " void *" pctx ", void *" ctx );
99 .B "typedef const struct tvec_vardef *tvec_envfindvarfn"
100 .BI " (struct tvec_state *" tv ", const char *" name ,
101 .BI " void **" ctx_out ", void *" ctx );
102 .BI "typedef void tvec_envbeforefn(struct tvec_state *" tv ", void *" ctx );
103 .ta \w'\fBtypedef void tvec_envrunfn('u
104 .BI "typedef void tvec_envrunfn(struct tvec_state *" tv ,
105 .BI " tvec_testfn *" fn ", void *" ctx );
106 .BI "typedef void tvec_envafterfn(struct tvec_state *" tv ", void *" ctx );
107 .BI "typedef void tvec_envteardownfn(struct tvec_state *" tv ", void *" ctx );
109 .B "struct tvec_env {"
111 .B " tvec_envsetupfn *setup;"
112 .B " tvec_envfindvarfn *findvar;"
113 .B " tvec_envbeforefn *before;"
114 .B " tvec_envrunfn *run;"
115 .B " tvec_envafterfn *after;"
116 .B " tvec_envteardownfn *teardown;"
119 .ta \w'\fBstruct tvec_reg *TVEC_GREG('u
120 .BI "struct tvec_reg *TVEC_GREG(struct tvec_reg *" vec ,
121 .BI " unsigned " i ", size_t " regsz );
122 .ta \w'\fBstruct tvec_reg *TVEC_REG('u
123 .BI "struct tvec_reg *TVEC_REG(struct tvec_state *" tv ", " vec ", unsigned " i );
125 .BI "void tvec_skipgroup(struct tvec_state *" tv ", const char *" excuse ", ...);"
126 .ta \w'\fBvoid tvec_skipgroup_v('u
127 .BI "void tvec_skipgroup_v(struct tvec_state *" tv ,
128 .BI " const char *" excuse ", va_list *" ap );
129 .BI "void tvec_skip(struct tvec_state *" tv ", const char *" excuse ", ...);"
130 .ta \w'\fBvoid tvec_skip_v('u
131 .BI "void tvec_skip_v(struct tvec_state *" tv ,
132 .BI " const char *" excuse ", va_list *" ap );
133 .BI "void tvec_fail(struct tvec_state *" tv ", const char *" detail ", ...);"
134 .ta \w'\fBvoid tvec_fail_v('u
135 .BI "void tvec_fail_v(struct tvec_state *" tv ,
136 .BI " const char *" detail ", va_list *" ap );
137 .ta \w'\fBvoid tvec_dumpreg('u
138 .BI "void tvec_dumpreg(struct tvec_state *" tv ,
139 .BI " unsigned " disp ", const union tvec_regval *" rv ,
140 .BI " const struct tvec_regdef *" rd );
142 .BI "void tvec_checkregs(struct tvec_state *" tv );
143 .BI "void tvec_mismatch(struct tvec_state *" tv ", unsigned " f );
144 .BI "void tvec_check(struct tvec_state *" tv ", const char *" detail ", ...);"
145 .ta \w'\fBvoid tvec_check_v('u
146 .BI "void tvec_check_v(struct tvec_state *" tv ,
147 .B "#define TVMF_IN ..."
148 .B "#define TVMF_OUT ..."
151 .B " TVLEV_NOTE = ...,"
152 .B " TVLEV_ERR = ...,"
155 .ta \w'\fBvoid tvec_report('u
156 .BI "void tvec_report(struct tvec_state *" tv ", unsigned " level ,
157 .BI " const char *" msg ", ...);"
158 .ta \w'\fBvoid tvec_report_v('u
159 .BI "void tvec_report_v(struct tvec_state *" tv ", unsigned " level ,
160 .BI " const char *" msg ", va_list *" ap );
161 .BI "int tvec_error(struct tvec_state *" tv ", const char *" msg ", ...);"
162 .BI "void tvec_notice(struct tvec_state *" tv ", const char *" msg ", ...);"
163 .BI "int tvec_unkreg(struct tvec_state *" tv ", const char *" name );
164 .BI "int tvec_dupreg(struct tvec_state *" tv ", const char *" name );
166 .ta \w'\fBint tvec_serialize('u
167 .BI "int tvec_serialize(const struct tvec_reg *" rv ", buf *" b ,
168 .BI " const struct tvec_regdef *" regs ,
169 .BI " unsigned " nr ", size_t " regsz );
170 .ta \w'\fBint tvec_deserialize('u
171 .BI "int tvec_deserialize(struct tvec_reg *" rv ", buf *" b ,
172 .BI " const struct tvec_regdef *" regs ,
173 .BI " unsigned " nr ", size_t " regsz );
175 .BI "void tvec_initregs(struct tvec_state *" tv );
176 .BI "void tvec_releaseregs(struct tvec_state *" tv );
177 .BI "void tvec_releaseoutputs(struct tvec_state *" tv );