xref: /minix3/external/bsd/atf/dist/atf-c/error_test.c (revision 11be35a165022172ed3cea20f2b5df0307540b0e)
1*11be35a1SLionel Sambuc /*
2*11be35a1SLionel Sambuc  * Automated Testing Framework (atf)
3*11be35a1SLionel Sambuc  *
4*11be35a1SLionel Sambuc  * Copyright (c) 2008 The NetBSD Foundation, Inc.
5*11be35a1SLionel Sambuc  * All rights reserved.
6*11be35a1SLionel Sambuc  *
7*11be35a1SLionel Sambuc  * Redistribution and use in source and binary forms, with or without
8*11be35a1SLionel Sambuc  * modification, are permitted provided that the following conditions
9*11be35a1SLionel Sambuc  * are met:
10*11be35a1SLionel Sambuc  * 1. Redistributions of source code must retain the above copyright
11*11be35a1SLionel Sambuc  *    notice, this list of conditions and the following disclaimer.
12*11be35a1SLionel Sambuc  * 2. Redistributions in binary form must reproduce the above copyright
13*11be35a1SLionel Sambuc  *    notice, this list of conditions and the following disclaimer in the
14*11be35a1SLionel Sambuc  *    documentation and/or other materials provided with the distribution.
15*11be35a1SLionel Sambuc  *
16*11be35a1SLionel Sambuc  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
17*11be35a1SLionel Sambuc  * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18*11be35a1SLionel Sambuc  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19*11be35a1SLionel Sambuc  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20*11be35a1SLionel Sambuc  * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
21*11be35a1SLionel Sambuc  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*11be35a1SLionel Sambuc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23*11be35a1SLionel Sambuc  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24*11be35a1SLionel Sambuc  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25*11be35a1SLionel Sambuc  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26*11be35a1SLionel Sambuc  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27*11be35a1SLionel Sambuc  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*11be35a1SLionel Sambuc  */
29*11be35a1SLionel Sambuc 
30*11be35a1SLionel Sambuc #include <errno.h>
31*11be35a1SLionel Sambuc #include <stdint.h>
32*11be35a1SLionel Sambuc #include <stdio.h>
33*11be35a1SLionel Sambuc #include <string.h>
34*11be35a1SLionel Sambuc 
35*11be35a1SLionel Sambuc #include <atf-c.h>
36*11be35a1SLionel Sambuc 
37*11be35a1SLionel Sambuc #include "atf-c/defs.h"
38*11be35a1SLionel Sambuc #include "atf-c/error.h"
39*11be35a1SLionel Sambuc 
40*11be35a1SLionel Sambuc #include "detail/test_helpers.h"
41*11be35a1SLionel Sambuc 
42*11be35a1SLionel Sambuc /* ---------------------------------------------------------------------
43*11be35a1SLionel Sambuc  * Auxiliary functions.
44*11be35a1SLionel Sambuc  * --------------------------------------------------------------------- */
45*11be35a1SLionel Sambuc 
46*11be35a1SLionel Sambuc static
47*11be35a1SLionel Sambuc void
test_format(const atf_error_t err ATF_DEFS_ATTRIBUTE_UNUSED,char * buf,size_t buflen)48*11be35a1SLionel Sambuc test_format(const atf_error_t err ATF_DEFS_ATTRIBUTE_UNUSED,
49*11be35a1SLionel Sambuc             char *buf, size_t buflen)
50*11be35a1SLionel Sambuc {
51*11be35a1SLionel Sambuc     snprintf(buf, buflen, "Test formatting function");
52*11be35a1SLionel Sambuc }
53*11be35a1SLionel Sambuc 
54*11be35a1SLionel Sambuc /* ---------------------------------------------------------------------
55*11be35a1SLionel Sambuc  * Tests for the "atf_error" type.
56*11be35a1SLionel Sambuc  * --------------------------------------------------------------------- */
57*11be35a1SLionel Sambuc 
58*11be35a1SLionel Sambuc ATF_TC(error_new);
ATF_TC_HEAD(error_new,tc)59*11be35a1SLionel Sambuc ATF_TC_HEAD(error_new, tc)
60*11be35a1SLionel Sambuc {
61*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the construction of an error "
62*11be35a1SLionel Sambuc                       "object");
63*11be35a1SLionel Sambuc }
ATF_TC_BODY(error_new,tc)64*11be35a1SLionel Sambuc ATF_TC_BODY(error_new, tc)
65*11be35a1SLionel Sambuc {
66*11be35a1SLionel Sambuc     atf_error_t err;
67*11be35a1SLionel Sambuc     int data;
68*11be35a1SLionel Sambuc 
69*11be35a1SLionel Sambuc     err = atf_error_new("test_error", NULL, 0, NULL);
70*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_is(err, "test_error"));
71*11be35a1SLionel Sambuc     ATF_REQUIRE(!atf_error_is(err, "unknown_error"));
72*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_data(err) == NULL);
73*11be35a1SLionel Sambuc     atf_error_free(err);
74*11be35a1SLionel Sambuc 
75*11be35a1SLionel Sambuc     data = 5;
76*11be35a1SLionel Sambuc     err = atf_error_new("test_data_error", &data, sizeof(data), NULL);
77*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_is(err, "test_data_error"));
78*11be35a1SLionel Sambuc     ATF_REQUIRE(!atf_error_is(err, "unknown_error"));
79*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_data(err) != NULL);
80*11be35a1SLionel Sambuc     ATF_REQUIRE_EQ(*((const int *)atf_error_data(err)), 5);
81*11be35a1SLionel Sambuc     atf_error_free(err);
82*11be35a1SLionel Sambuc }
83*11be35a1SLionel Sambuc 
84*11be35a1SLionel Sambuc ATF_TC(error_new_wo_memory);
ATF_TC_HEAD(error_new_wo_memory,tc)85*11be35a1SLionel Sambuc ATF_TC_HEAD(error_new_wo_memory, tc)
86*11be35a1SLionel Sambuc {
87*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks that an unavailable memory error "
88*11be35a1SLionel Sambuc                       "raised when constructing an error object "
89*11be35a1SLionel Sambuc                             "is properly converted to the no_memory "
90*11be35a1SLionel Sambuc                             "static error type");
91*11be35a1SLionel Sambuc }
ATF_TC_BODY(error_new_wo_memory,tc)92*11be35a1SLionel Sambuc ATF_TC_BODY(error_new_wo_memory, tc)
93*11be35a1SLionel Sambuc {
94*11be35a1SLionel Sambuc     atf_error_t err;
95*11be35a1SLionel Sambuc     void *invalid;
96*11be35a1SLionel Sambuc 
97*11be35a1SLionel Sambuc     invalid = (void *)1;
98*11be35a1SLionel Sambuc 
99*11be35a1SLionel Sambuc     err = atf_error_new("test_error", invalid, SIZE_MAX, NULL);
100*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_is(err, "no_memory"));
101*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_data(err) == NULL);
102*11be35a1SLionel Sambuc     atf_error_free(err);
103*11be35a1SLionel Sambuc }
104*11be35a1SLionel Sambuc 
105*11be35a1SLionel Sambuc ATF_TC(no_error);
ATF_TC_HEAD(no_error,tc)106*11be35a1SLionel Sambuc ATF_TC_HEAD(no_error, tc)
107*11be35a1SLionel Sambuc {
108*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks that constructing a non-error "
109*11be35a1SLionel Sambuc                       "object works");
110*11be35a1SLionel Sambuc }
ATF_TC_BODY(no_error,tc)111*11be35a1SLionel Sambuc ATF_TC_BODY(no_error, tc)
112*11be35a1SLionel Sambuc {
113*11be35a1SLionel Sambuc     atf_error_t err;
114*11be35a1SLionel Sambuc 
115*11be35a1SLionel Sambuc     err = atf_no_error();
116*11be35a1SLionel Sambuc     ATF_REQUIRE(!atf_is_error(err));
117*11be35a1SLionel Sambuc }
118*11be35a1SLionel Sambuc 
119*11be35a1SLionel Sambuc ATF_TC(is_error);
ATF_TC_HEAD(is_error,tc)120*11be35a1SLionel Sambuc ATF_TC_HEAD(is_error, tc)
121*11be35a1SLionel Sambuc {
122*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the is_error method to determine "
123*11be35a1SLionel Sambuc                       "if an error object holds success or an error");
124*11be35a1SLionel Sambuc }
ATF_TC_BODY(is_error,tc)125*11be35a1SLionel Sambuc ATF_TC_BODY(is_error, tc)
126*11be35a1SLionel Sambuc {
127*11be35a1SLionel Sambuc     atf_error_t err;
128*11be35a1SLionel Sambuc 
129*11be35a1SLionel Sambuc     err = atf_no_error();
130*11be35a1SLionel Sambuc     ATF_REQUIRE(!atf_is_error(err));
131*11be35a1SLionel Sambuc 
132*11be35a1SLionel Sambuc     err = atf_error_new("test_error", NULL, 0, NULL);
133*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_is_error(err));
134*11be35a1SLionel Sambuc     atf_error_free(err);
135*11be35a1SLionel Sambuc }
136*11be35a1SLionel Sambuc 
137*11be35a1SLionel Sambuc ATF_TC(format);
ATF_TC_HEAD(format,tc)138*11be35a1SLionel Sambuc ATF_TC_HEAD(format, tc)
139*11be35a1SLionel Sambuc {
140*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the default formatting function "
141*11be35a1SLionel Sambuc                       "and the ability to change it");
142*11be35a1SLionel Sambuc }
ATF_TC_BODY(format,tc)143*11be35a1SLionel Sambuc ATF_TC_BODY(format, tc)
144*11be35a1SLionel Sambuc {
145*11be35a1SLionel Sambuc     atf_error_t err;
146*11be35a1SLionel Sambuc     char buf[1024];
147*11be35a1SLionel Sambuc 
148*11be35a1SLionel Sambuc     printf("Testing default formatting function\n");
149*11be35a1SLionel Sambuc     err = atf_error_new("test_error", NULL, 0, NULL);
150*11be35a1SLionel Sambuc     atf_error_format(err, buf, sizeof(buf));
151*11be35a1SLionel Sambuc     printf("Error string is: %s\n", buf);
152*11be35a1SLionel Sambuc     ATF_REQUIRE(strcmp(buf, "Error 'test_error'") == 0);
153*11be35a1SLionel Sambuc     atf_error_free(err);
154*11be35a1SLionel Sambuc 
155*11be35a1SLionel Sambuc     printf("Testing custom formatting function\n");
156*11be35a1SLionel Sambuc     err = atf_error_new("test_error", NULL, 0, test_format);
157*11be35a1SLionel Sambuc     atf_error_format(err, buf, sizeof(buf));
158*11be35a1SLionel Sambuc     printf("Error string is: %s\n", buf);
159*11be35a1SLionel Sambuc     ATF_REQUIRE(strcmp(buf, "Test formatting function") == 0);
160*11be35a1SLionel Sambuc     atf_error_free(err);
161*11be35a1SLionel Sambuc }
162*11be35a1SLionel Sambuc 
163*11be35a1SLionel Sambuc /* ---------------------------------------------------------------------
164*11be35a1SLionel Sambuc  * Tests for the "libc" error.
165*11be35a1SLionel Sambuc  * --------------------------------------------------------------------- */
166*11be35a1SLionel Sambuc 
167*11be35a1SLionel Sambuc ATF_TC(libc_new);
ATF_TC_HEAD(libc_new,tc)168*11be35a1SLionel Sambuc ATF_TC_HEAD(libc_new, tc)
169*11be35a1SLionel Sambuc {
170*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the construction of libc errors");
171*11be35a1SLionel Sambuc }
ATF_TC_BODY(libc_new,tc)172*11be35a1SLionel Sambuc ATF_TC_BODY(libc_new, tc)
173*11be35a1SLionel Sambuc {
174*11be35a1SLionel Sambuc     atf_error_t err;
175*11be35a1SLionel Sambuc 
176*11be35a1SLionel Sambuc     err = atf_libc_error(ENOMEM, "Test message 1");
177*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_is(err, "libc"));
178*11be35a1SLionel Sambuc     ATF_REQUIRE_EQ(atf_libc_error_code(err), ENOMEM);
179*11be35a1SLionel Sambuc     ATF_REQUIRE(strcmp(atf_libc_error_msg(err), "Test message 1") == 0);
180*11be35a1SLionel Sambuc     atf_error_free(err);
181*11be35a1SLionel Sambuc 
182*11be35a1SLionel Sambuc     err = atf_libc_error(EPERM, "%s message %d", "Test", 2);
183*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_is(err, "libc"));
184*11be35a1SLionel Sambuc     ATF_REQUIRE_EQ(atf_libc_error_code(err), EPERM);
185*11be35a1SLionel Sambuc     ATF_REQUIRE(strcmp(atf_libc_error_msg(err), "Test message 2") == 0);
186*11be35a1SLionel Sambuc     atf_error_free(err);
187*11be35a1SLionel Sambuc }
188*11be35a1SLionel Sambuc 
189*11be35a1SLionel Sambuc ATF_TC(libc_format);
ATF_TC_HEAD(libc_format,tc)190*11be35a1SLionel Sambuc ATF_TC_HEAD(libc_format, tc)
191*11be35a1SLionel Sambuc {
192*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the formatting of libc errors");
193*11be35a1SLionel Sambuc }
ATF_TC_BODY(libc_format,tc)194*11be35a1SLionel Sambuc ATF_TC_BODY(libc_format, tc)
195*11be35a1SLionel Sambuc {
196*11be35a1SLionel Sambuc     atf_error_t err;
197*11be35a1SLionel Sambuc     char buf[1024];
198*11be35a1SLionel Sambuc 
199*11be35a1SLionel Sambuc     err = atf_libc_error(ENOMEM, "Test message 1");
200*11be35a1SLionel Sambuc     atf_error_format(err, buf, sizeof(buf));
201*11be35a1SLionel Sambuc     ATF_REQUIRE(strstr(buf, strerror(ENOMEM)) != NULL);
202*11be35a1SLionel Sambuc     ATF_REQUIRE(strstr(buf, "Test message 1") != NULL);
203*11be35a1SLionel Sambuc     atf_error_free(err);
204*11be35a1SLionel Sambuc 
205*11be35a1SLionel Sambuc     err = atf_libc_error(EPERM, "Test message 2");
206*11be35a1SLionel Sambuc     atf_error_format(err, buf, sizeof(buf));
207*11be35a1SLionel Sambuc     ATF_REQUIRE(strstr(buf, strerror(EPERM)) != NULL);
208*11be35a1SLionel Sambuc     ATF_REQUIRE(strstr(buf, "Test message 2") != NULL);
209*11be35a1SLionel Sambuc     atf_error_free(err);
210*11be35a1SLionel Sambuc 
211*11be35a1SLionel Sambuc     err = atf_libc_error(EPERM, "%s message %d", "Test", 3);
212*11be35a1SLionel Sambuc     atf_error_format(err, buf, sizeof(buf));
213*11be35a1SLionel Sambuc     ATF_REQUIRE(strstr(buf, strerror(EPERM)) != NULL);
214*11be35a1SLionel Sambuc     ATF_REQUIRE(strstr(buf, "Test message 3") != NULL);
215*11be35a1SLionel Sambuc     atf_error_free(err);
216*11be35a1SLionel Sambuc }
217*11be35a1SLionel Sambuc 
218*11be35a1SLionel Sambuc /* ---------------------------------------------------------------------
219*11be35a1SLionel Sambuc  * Tests for the "no_memory" error.
220*11be35a1SLionel Sambuc  * --------------------------------------------------------------------- */
221*11be35a1SLionel Sambuc 
222*11be35a1SLionel Sambuc ATF_TC(no_memory_new);
ATF_TC_HEAD(no_memory_new,tc)223*11be35a1SLionel Sambuc ATF_TC_HEAD(no_memory_new, tc)
224*11be35a1SLionel Sambuc {
225*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the construction of no_memory "
226*11be35a1SLionel Sambuc                       "errors");
227*11be35a1SLionel Sambuc }
ATF_TC_BODY(no_memory_new,tc)228*11be35a1SLionel Sambuc ATF_TC_BODY(no_memory_new, tc)
229*11be35a1SLionel Sambuc {
230*11be35a1SLionel Sambuc     atf_error_t err;
231*11be35a1SLionel Sambuc 
232*11be35a1SLionel Sambuc     err = atf_no_memory_error();
233*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_is(err, "no_memory"));
234*11be35a1SLionel Sambuc     ATF_REQUIRE(atf_error_data(err) == NULL);
235*11be35a1SLionel Sambuc     atf_error_free(err);
236*11be35a1SLionel Sambuc }
237*11be35a1SLionel Sambuc 
238*11be35a1SLionel Sambuc ATF_TC(no_memory_format);
ATF_TC_HEAD(no_memory_format,tc)239*11be35a1SLionel Sambuc ATF_TC_HEAD(no_memory_format, tc)
240*11be35a1SLionel Sambuc {
241*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the formatting of no_memory "
242*11be35a1SLionel Sambuc                       "errors");
243*11be35a1SLionel Sambuc }
ATF_TC_BODY(no_memory_format,tc)244*11be35a1SLionel Sambuc ATF_TC_BODY(no_memory_format, tc)
245*11be35a1SLionel Sambuc {
246*11be35a1SLionel Sambuc     atf_error_t err;
247*11be35a1SLionel Sambuc     char buf[1024];
248*11be35a1SLionel Sambuc 
249*11be35a1SLionel Sambuc     err = atf_no_memory_error();
250*11be35a1SLionel Sambuc     atf_error_format(err, buf, sizeof(buf));
251*11be35a1SLionel Sambuc     ATF_REQUIRE(strcmp(buf, "Not enough memory") == 0);
252*11be35a1SLionel Sambuc     atf_error_free(err);
253*11be35a1SLionel Sambuc }
254*11be35a1SLionel Sambuc 
255*11be35a1SLionel Sambuc ATF_TC(no_memory_twice);
ATF_TC_HEAD(no_memory_twice,tc)256*11be35a1SLionel Sambuc ATF_TC_HEAD(no_memory_twice, tc)
257*11be35a1SLionel Sambuc {
258*11be35a1SLionel Sambuc     atf_tc_set_md_var(tc, "descr", "Checks the construction of no_memory "
259*11be35a1SLionel Sambuc                       "errors multiple times, as this error is initialized "
260*11be35a1SLionel Sambuc                       "statically");
261*11be35a1SLionel Sambuc }
ATF_TC_BODY(no_memory_twice,tc)262*11be35a1SLionel Sambuc ATF_TC_BODY(no_memory_twice, tc)
263*11be35a1SLionel Sambuc {
264*11be35a1SLionel Sambuc     {
265*11be35a1SLionel Sambuc         atf_error_t err = atf_no_memory_error();
266*11be35a1SLionel Sambuc         ATF_REQUIRE(atf_error_is(err, "no_memory"));
267*11be35a1SLionel Sambuc         ATF_REQUIRE(atf_error_data(err) == NULL);
268*11be35a1SLionel Sambuc         atf_error_free(err);
269*11be35a1SLionel Sambuc     }
270*11be35a1SLionel Sambuc 
271*11be35a1SLionel Sambuc     {
272*11be35a1SLionel Sambuc         atf_error_t err = atf_no_memory_error();
273*11be35a1SLionel Sambuc         ATF_REQUIRE(atf_error_is(err, "no_memory"));
274*11be35a1SLionel Sambuc         ATF_REQUIRE(atf_error_data(err) == NULL);
275*11be35a1SLionel Sambuc         atf_error_free(err);
276*11be35a1SLionel Sambuc     }
277*11be35a1SLionel Sambuc }
278*11be35a1SLionel Sambuc 
279*11be35a1SLionel Sambuc /* ---------------------------------------------------------------------
280*11be35a1SLionel Sambuc  * Tests cases for the header file.
281*11be35a1SLionel Sambuc  * --------------------------------------------------------------------- */
282*11be35a1SLionel Sambuc 
283*11be35a1SLionel Sambuc HEADER_TC(include, "atf-c/error.h");
284*11be35a1SLionel Sambuc HEADER_TC(include_fwd, "atf-c/error_fwd.h");
285*11be35a1SLionel Sambuc 
286*11be35a1SLionel Sambuc /* ---------------------------------------------------------------------
287*11be35a1SLionel Sambuc  * Main.
288*11be35a1SLionel Sambuc  * --------------------------------------------------------------------- */
289*11be35a1SLionel Sambuc 
ATF_TP_ADD_TCS(tp)290*11be35a1SLionel Sambuc ATF_TP_ADD_TCS(tp)
291*11be35a1SLionel Sambuc {
292*11be35a1SLionel Sambuc     /* Add the tests for the "atf_error" type. */
293*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, error_new);
294*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, error_new_wo_memory);
295*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, no_error);
296*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, is_error);
297*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, format);
298*11be35a1SLionel Sambuc 
299*11be35a1SLionel Sambuc     /* Add the tests for the "libc" error. */
300*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, libc_new);
301*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, libc_format);
302*11be35a1SLionel Sambuc 
303*11be35a1SLionel Sambuc     /* Add the tests for the "no_memory" error. */
304*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, no_memory_new);
305*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, no_memory_format);
306*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, no_memory_twice);
307*11be35a1SLionel Sambuc 
308*11be35a1SLionel Sambuc     /* Add the test cases for the header file. */
309*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, include);
310*11be35a1SLionel Sambuc     ATF_TP_ADD_TC(tp, include_fwd);
311*11be35a1SLionel Sambuc 
312*11be35a1SLionel Sambuc     return atf_no_error();
313*11be35a1SLionel Sambuc }
314