xref: /minix3/tests/include/t_errno.c (revision 11be35a165022172ed3cea20f2b5df0307540b0e)
1*11be35a1SLionel Sambuc /*	$NetBSD: t_errno.c,v 1.1 2011/05/01 17:07:05 jruoho Exp $ */
2*11be35a1SLionel Sambuc 
3*11be35a1SLionel Sambuc /*-
4*11be35a1SLionel Sambuc  * Copyright (c) 2011 The NetBSD Foundation, Inc.
5*11be35a1SLionel Sambuc  * All rights reserved.
6*11be35a1SLionel Sambuc  *
7*11be35a1SLionel Sambuc  * This code is derived from software contributed to The NetBSD Foundation
8*11be35a1SLionel Sambuc  * by Jukka Ruohonen.
9*11be35a1SLionel Sambuc  *
10*11be35a1SLionel Sambuc  * Redistribution and use in source and binary forms, with or without
11*11be35a1SLionel Sambuc  * modification, are permitted provided that the following conditions
12*11be35a1SLionel Sambuc  * are met:
13*11be35a1SLionel Sambuc  * 1. Redistributions of source code must retain the above copyright
14*11be35a1SLionel Sambuc  *    notice, this list of conditions and the following disclaimer.
15*11be35a1SLionel Sambuc  * 2. Redistributions in binary form must reproduce the above copyright
16*11be35a1SLionel Sambuc  *    notice, this list of conditions and the following disclaimer in the
17*11be35a1SLionel Sambuc  *    documentation and/or other materials provided with the distribution.
18*11be35a1SLionel Sambuc  *
19*11be35a1SLionel Sambuc  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*11be35a1SLionel Sambuc  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*11be35a1SLionel Sambuc  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*11be35a1SLionel Sambuc  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*11be35a1SLionel Sambuc  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*11be35a1SLionel Sambuc  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*11be35a1SLionel Sambuc  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*11be35a1SLionel Sambuc  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*11be35a1SLionel Sambuc  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*11be35a1SLionel Sambuc  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*11be35a1SLionel Sambuc  * POSSIBILITY OF SUCH DAMAGE.
30*11be35a1SLionel Sambuc  */
31*11be35a1SLionel Sambuc #include <sys/cdefs.h>
32*11be35a1SLionel Sambuc __RCSID("$NetBSD: t_errno.c,v 1.1 2011/05/01 17:07:05 jruoho Exp $");
33*11be35a1SLionel Sambuc 
34*11be35a1SLionel Sambuc #include <atf-c.h>
35*11be35a1SLionel Sambuc #include <errno.h>
36*11be35a1SLionel Sambuc 
37*11be35a1SLionel Sambuc ATF_TC(errno_constants);
ATF_TC_HEAD(errno_constants,tc)38*11be35a1SLionel Sambuc ATF_TC_HEAD(errno_constants, tc)
39*11be35a1SLionel Sambuc {
40*11be35a1SLionel Sambuc 	atf_tc_set_md_var(tc, "descr", "Test POSIX constants in <errno.h>");
41*11be35a1SLionel Sambuc }
42*11be35a1SLionel Sambuc 
ATF_TC_BODY(errno_constants,tc)43*11be35a1SLionel Sambuc ATF_TC_BODY(errno_constants, tc)
44*11be35a1SLionel Sambuc {
45*11be35a1SLionel Sambuc 	bool fail;
46*11be35a1SLionel Sambuc 
47*11be35a1SLionel Sambuc 	/*
48*11be35a1SLionel Sambuc 	 * The following definitions should be available
49*11be35a1SLionel Sambuc 	 * according to IEEE Std 1003.1-2008, issue 7.
50*11be35a1SLionel Sambuc 	 */
51*11be35a1SLionel Sambuc 	atf_tc_expect_fail("PR standards/44921");
52*11be35a1SLionel Sambuc 
53*11be35a1SLionel Sambuc 	fail = true;
54*11be35a1SLionel Sambuc 
55*11be35a1SLionel Sambuc #ifdef E2BIG
56*11be35a1SLionel Sambuc 	fail = false;
57*11be35a1SLionel Sambuc #endif
58*11be35a1SLionel Sambuc 	if (fail != false)
59*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("E2BIG not defined");
60*11be35a1SLionel Sambuc 
61*11be35a1SLionel Sambuc 	fail = true;
62*11be35a1SLionel Sambuc 
63*11be35a1SLionel Sambuc #ifdef EACCES
64*11be35a1SLionel Sambuc 	fail = false;
65*11be35a1SLionel Sambuc #endif
66*11be35a1SLionel Sambuc 	if (fail != false)
67*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EACCES not defined");
68*11be35a1SLionel Sambuc 
69*11be35a1SLionel Sambuc 	fail = true;
70*11be35a1SLionel Sambuc 
71*11be35a1SLionel Sambuc #ifdef EADDRINUSE
72*11be35a1SLionel Sambuc 	fail = false;
73*11be35a1SLionel Sambuc #endif
74*11be35a1SLionel Sambuc 	if (fail != false)
75*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EADDRINUSE not defined");
76*11be35a1SLionel Sambuc 
77*11be35a1SLionel Sambuc 	fail = true;
78*11be35a1SLionel Sambuc 
79*11be35a1SLionel Sambuc #ifdef EADDRNOTAVAIL
80*11be35a1SLionel Sambuc 	fail = false;
81*11be35a1SLionel Sambuc #endif
82*11be35a1SLionel Sambuc 	if (fail != false)
83*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EADDRNOTAVAIL not defined");
84*11be35a1SLionel Sambuc 
85*11be35a1SLionel Sambuc 	fail = true;
86*11be35a1SLionel Sambuc 
87*11be35a1SLionel Sambuc #ifdef EAFNOSUPPORT
88*11be35a1SLionel Sambuc 	fail = false;
89*11be35a1SLionel Sambuc #endif
90*11be35a1SLionel Sambuc 	if (fail != false)
91*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EAFNOSUPPORT not defined");
92*11be35a1SLionel Sambuc 
93*11be35a1SLionel Sambuc 	fail = true;
94*11be35a1SLionel Sambuc 
95*11be35a1SLionel Sambuc #ifdef EAGAIN
96*11be35a1SLionel Sambuc 	fail = false;
97*11be35a1SLionel Sambuc #endif
98*11be35a1SLionel Sambuc 	if (fail != false)
99*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EAGAIN not defined");
100*11be35a1SLionel Sambuc 
101*11be35a1SLionel Sambuc 	fail = true;
102*11be35a1SLionel Sambuc 
103*11be35a1SLionel Sambuc #ifdef EALREADY
104*11be35a1SLionel Sambuc 	fail = false;
105*11be35a1SLionel Sambuc #endif
106*11be35a1SLionel Sambuc 	if (fail != false)
107*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EALREADY not defined");
108*11be35a1SLionel Sambuc 
109*11be35a1SLionel Sambuc 	fail = true;
110*11be35a1SLionel Sambuc 
111*11be35a1SLionel Sambuc #ifdef EBADF
112*11be35a1SLionel Sambuc 	fail = false;
113*11be35a1SLionel Sambuc #endif
114*11be35a1SLionel Sambuc 	if (fail != false)
115*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EBADF not defined");
116*11be35a1SLionel Sambuc 
117*11be35a1SLionel Sambuc 	fail = true;
118*11be35a1SLionel Sambuc 
119*11be35a1SLionel Sambuc #ifdef EBADMSG
120*11be35a1SLionel Sambuc 	fail = false;
121*11be35a1SLionel Sambuc #endif
122*11be35a1SLionel Sambuc 	if (fail != false)
123*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EBADMSG not defined");
124*11be35a1SLionel Sambuc 
125*11be35a1SLionel Sambuc 	fail = true;
126*11be35a1SLionel Sambuc 
127*11be35a1SLionel Sambuc #ifdef EBUSY
128*11be35a1SLionel Sambuc 	fail = false;
129*11be35a1SLionel Sambuc #endif
130*11be35a1SLionel Sambuc 	if (fail != false)
131*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EBUSY not defined");
132*11be35a1SLionel Sambuc 
133*11be35a1SLionel Sambuc 	fail = true;
134*11be35a1SLionel Sambuc 
135*11be35a1SLionel Sambuc #ifdef ECANCELED
136*11be35a1SLionel Sambuc 	fail = false;
137*11be35a1SLionel Sambuc #endif
138*11be35a1SLionel Sambuc 	if (fail != false)
139*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ECANCELED not defined");
140*11be35a1SLionel Sambuc 
141*11be35a1SLionel Sambuc 	fail = true;
142*11be35a1SLionel Sambuc 
143*11be35a1SLionel Sambuc #ifdef ECHILD
144*11be35a1SLionel Sambuc 	fail = false;
145*11be35a1SLionel Sambuc #endif
146*11be35a1SLionel Sambuc 	if (fail != false)
147*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ECHILD not defined");
148*11be35a1SLionel Sambuc 
149*11be35a1SLionel Sambuc 	fail = true;
150*11be35a1SLionel Sambuc 
151*11be35a1SLionel Sambuc #ifdef ECONNABORTED
152*11be35a1SLionel Sambuc 	fail = false;
153*11be35a1SLionel Sambuc #endif
154*11be35a1SLionel Sambuc 	if (fail != false)
155*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ECONNABORTED not defined");
156*11be35a1SLionel Sambuc 
157*11be35a1SLionel Sambuc 	fail = true;
158*11be35a1SLionel Sambuc 
159*11be35a1SLionel Sambuc #ifdef ECONNREFUSED
160*11be35a1SLionel Sambuc 	fail = false;
161*11be35a1SLionel Sambuc #endif
162*11be35a1SLionel Sambuc 	if (fail != false)
163*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ECONNREFUSED not defined");
164*11be35a1SLionel Sambuc 
165*11be35a1SLionel Sambuc 	fail = true;
166*11be35a1SLionel Sambuc 
167*11be35a1SLionel Sambuc #ifdef ECONNRESET
168*11be35a1SLionel Sambuc 	fail = false;
169*11be35a1SLionel Sambuc #endif
170*11be35a1SLionel Sambuc 	if (fail != false)
171*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ECONNRESET not defined");
172*11be35a1SLionel Sambuc 
173*11be35a1SLionel Sambuc 	fail = true;
174*11be35a1SLionel Sambuc 
175*11be35a1SLionel Sambuc #ifdef EDEADLK
176*11be35a1SLionel Sambuc 	fail = false;
177*11be35a1SLionel Sambuc #endif
178*11be35a1SLionel Sambuc 	if (fail != false)
179*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EDEADLK not defined");
180*11be35a1SLionel Sambuc 
181*11be35a1SLionel Sambuc 	fail = true;
182*11be35a1SLionel Sambuc 
183*11be35a1SLionel Sambuc #ifdef EDESTADDRREQ
184*11be35a1SLionel Sambuc 	fail = false;
185*11be35a1SLionel Sambuc #endif
186*11be35a1SLionel Sambuc 	if (fail != false)
187*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EDESTADDRREQ not defined");
188*11be35a1SLionel Sambuc 
189*11be35a1SLionel Sambuc 	fail = true;
190*11be35a1SLionel Sambuc 
191*11be35a1SLionel Sambuc #ifdef EDOM
192*11be35a1SLionel Sambuc 	fail = false;
193*11be35a1SLionel Sambuc #endif
194*11be35a1SLionel Sambuc 	if (fail != false)
195*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EDOM not defined");
196*11be35a1SLionel Sambuc 
197*11be35a1SLionel Sambuc 	fail = true;
198*11be35a1SLionel Sambuc 
199*11be35a1SLionel Sambuc #ifdef EDQUOT
200*11be35a1SLionel Sambuc 	fail = false;
201*11be35a1SLionel Sambuc #endif
202*11be35a1SLionel Sambuc 	if (fail != false)
203*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EDQUOT not defined");
204*11be35a1SLionel Sambuc 
205*11be35a1SLionel Sambuc 	fail = true;
206*11be35a1SLionel Sambuc 
207*11be35a1SLionel Sambuc #ifdef EEXIST
208*11be35a1SLionel Sambuc 	fail = false;
209*11be35a1SLionel Sambuc #endif
210*11be35a1SLionel Sambuc 	if (fail != false)
211*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EEXIST not defined");
212*11be35a1SLionel Sambuc 
213*11be35a1SLionel Sambuc 	fail = true;
214*11be35a1SLionel Sambuc 
215*11be35a1SLionel Sambuc #ifdef EFAULT
216*11be35a1SLionel Sambuc 	fail = false;
217*11be35a1SLionel Sambuc #endif
218*11be35a1SLionel Sambuc 	if (fail != false)
219*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EFAULT not defined");
220*11be35a1SLionel Sambuc 
221*11be35a1SLionel Sambuc 	fail = true;
222*11be35a1SLionel Sambuc 
223*11be35a1SLionel Sambuc #ifdef EFBIG
224*11be35a1SLionel Sambuc 	fail = false;
225*11be35a1SLionel Sambuc #endif
226*11be35a1SLionel Sambuc 	if (fail != false)
227*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EFBIG not defined");
228*11be35a1SLionel Sambuc 
229*11be35a1SLionel Sambuc 	fail = true;
230*11be35a1SLionel Sambuc 
231*11be35a1SLionel Sambuc #ifdef EHOSTUNREACH
232*11be35a1SLionel Sambuc 	fail = false;
233*11be35a1SLionel Sambuc #endif
234*11be35a1SLionel Sambuc 	if (fail != false)
235*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EHOSTUNREACH not defined");
236*11be35a1SLionel Sambuc 
237*11be35a1SLionel Sambuc 	fail = true;
238*11be35a1SLionel Sambuc 
239*11be35a1SLionel Sambuc #ifdef EIDRM
240*11be35a1SLionel Sambuc 	fail = false;
241*11be35a1SLionel Sambuc #endif
242*11be35a1SLionel Sambuc 	if (fail != false)
243*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EIDRM not defined");
244*11be35a1SLionel Sambuc 
245*11be35a1SLionel Sambuc 	fail = true;
246*11be35a1SLionel Sambuc 
247*11be35a1SLionel Sambuc #ifdef EILSEQ
248*11be35a1SLionel Sambuc 	fail = false;
249*11be35a1SLionel Sambuc #endif
250*11be35a1SLionel Sambuc 
251*11be35a1SLionel Sambuc 	if (fail != false)
252*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EILSEQ not defined");
253*11be35a1SLionel Sambuc 
254*11be35a1SLionel Sambuc 	fail = true;
255*11be35a1SLionel Sambuc 
256*11be35a1SLionel Sambuc #ifdef EINPROGRESS
257*11be35a1SLionel Sambuc 	fail = false;
258*11be35a1SLionel Sambuc #endif
259*11be35a1SLionel Sambuc 
260*11be35a1SLionel Sambuc 	if (fail != false)
261*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EINPROGRESS not defined");
262*11be35a1SLionel Sambuc 
263*11be35a1SLionel Sambuc 	fail = true;
264*11be35a1SLionel Sambuc 
265*11be35a1SLionel Sambuc #ifdef EINTR
266*11be35a1SLionel Sambuc 	fail = false;
267*11be35a1SLionel Sambuc #endif
268*11be35a1SLionel Sambuc 
269*11be35a1SLionel Sambuc 	if (fail != false)
270*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EINTR not defined");
271*11be35a1SLionel Sambuc 
272*11be35a1SLionel Sambuc 	fail = true;
273*11be35a1SLionel Sambuc 
274*11be35a1SLionel Sambuc #ifdef EINVAL
275*11be35a1SLionel Sambuc 	fail = false;
276*11be35a1SLionel Sambuc #endif
277*11be35a1SLionel Sambuc 
278*11be35a1SLionel Sambuc 	if (fail != false)
279*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EINVAL not defined");
280*11be35a1SLionel Sambuc 
281*11be35a1SLionel Sambuc 	fail = true;
282*11be35a1SLionel Sambuc 
283*11be35a1SLionel Sambuc #ifdef EIO
284*11be35a1SLionel Sambuc 	fail = false;
285*11be35a1SLionel Sambuc #endif
286*11be35a1SLionel Sambuc 
287*11be35a1SLionel Sambuc 	if (fail != false)
288*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EIO not defined");
289*11be35a1SLionel Sambuc 
290*11be35a1SLionel Sambuc 	fail = true;
291*11be35a1SLionel Sambuc 
292*11be35a1SLionel Sambuc #ifdef EISCONN
293*11be35a1SLionel Sambuc 	fail = false;
294*11be35a1SLionel Sambuc #endif
295*11be35a1SLionel Sambuc 
296*11be35a1SLionel Sambuc 	if (fail != false)
297*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EISCONN not defined");
298*11be35a1SLionel Sambuc 
299*11be35a1SLionel Sambuc 	fail = true;
300*11be35a1SLionel Sambuc 
301*11be35a1SLionel Sambuc #ifdef EISDIR
302*11be35a1SLionel Sambuc 	fail = false;
303*11be35a1SLionel Sambuc #endif
304*11be35a1SLionel Sambuc 
305*11be35a1SLionel Sambuc 	if (fail != false)
306*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EISDIR not defined");
307*11be35a1SLionel Sambuc 
308*11be35a1SLionel Sambuc 	fail = true;
309*11be35a1SLionel Sambuc 
310*11be35a1SLionel Sambuc #ifdef ELOOP
311*11be35a1SLionel Sambuc 	fail = false;
312*11be35a1SLionel Sambuc #endif
313*11be35a1SLionel Sambuc 
314*11be35a1SLionel Sambuc 	if (fail != false)
315*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ELOOP not defined");
316*11be35a1SLionel Sambuc 
317*11be35a1SLionel Sambuc 	fail = true;
318*11be35a1SLionel Sambuc 
319*11be35a1SLionel Sambuc #ifdef EMFILE
320*11be35a1SLionel Sambuc 	fail = false;
321*11be35a1SLionel Sambuc #endif
322*11be35a1SLionel Sambuc 
323*11be35a1SLionel Sambuc 	if (fail != false)
324*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EMFILE not defined");
325*11be35a1SLionel Sambuc 
326*11be35a1SLionel Sambuc 	fail = true;
327*11be35a1SLionel Sambuc 
328*11be35a1SLionel Sambuc #ifdef EMLINK
329*11be35a1SLionel Sambuc 	fail = false;
330*11be35a1SLionel Sambuc #endif
331*11be35a1SLionel Sambuc 
332*11be35a1SLionel Sambuc 	if (fail != false)
333*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EMLINK not defined");
334*11be35a1SLionel Sambuc 
335*11be35a1SLionel Sambuc 	fail = true;
336*11be35a1SLionel Sambuc 
337*11be35a1SLionel Sambuc #ifdef EMSGSIZE
338*11be35a1SLionel Sambuc 	fail = false;
339*11be35a1SLionel Sambuc #endif
340*11be35a1SLionel Sambuc 
341*11be35a1SLionel Sambuc 	if (fail != false)
342*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EMSGSIZE not defined");
343*11be35a1SLionel Sambuc 
344*11be35a1SLionel Sambuc 	fail = true;
345*11be35a1SLionel Sambuc 
346*11be35a1SLionel Sambuc #ifdef EMULTIHOP
347*11be35a1SLionel Sambuc 	fail = false;
348*11be35a1SLionel Sambuc #endif
349*11be35a1SLionel Sambuc 
350*11be35a1SLionel Sambuc 	if (fail != false)
351*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EMULTIHOP not defined");
352*11be35a1SLionel Sambuc 
353*11be35a1SLionel Sambuc 	fail = true;
354*11be35a1SLionel Sambuc 
355*11be35a1SLionel Sambuc #ifdef ENAMETOOLONG
356*11be35a1SLionel Sambuc 	fail = false;
357*11be35a1SLionel Sambuc #endif
358*11be35a1SLionel Sambuc 
359*11be35a1SLionel Sambuc 	if (fail != false)
360*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENAMETOOLONG not defined");
361*11be35a1SLionel Sambuc 
362*11be35a1SLionel Sambuc 	fail = true;
363*11be35a1SLionel Sambuc 
364*11be35a1SLionel Sambuc #ifdef ENETDOWN
365*11be35a1SLionel Sambuc 	fail = false;
366*11be35a1SLionel Sambuc #endif
367*11be35a1SLionel Sambuc 
368*11be35a1SLionel Sambuc 	if (fail != false)
369*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENETDOWN not defined");
370*11be35a1SLionel Sambuc 
371*11be35a1SLionel Sambuc 	fail = true;
372*11be35a1SLionel Sambuc 
373*11be35a1SLionel Sambuc #ifdef ENETRESET
374*11be35a1SLionel Sambuc 	fail = false;
375*11be35a1SLionel Sambuc #endif
376*11be35a1SLionel Sambuc 
377*11be35a1SLionel Sambuc 	if (fail != false)
378*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENETRESET not defined");
379*11be35a1SLionel Sambuc 
380*11be35a1SLionel Sambuc 	fail = true;
381*11be35a1SLionel Sambuc 
382*11be35a1SLionel Sambuc #ifdef ENETUNREACH
383*11be35a1SLionel Sambuc 	fail = false;
384*11be35a1SLionel Sambuc #endif
385*11be35a1SLionel Sambuc 
386*11be35a1SLionel Sambuc 	if (fail != false)
387*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENETUNREACH not defined");
388*11be35a1SLionel Sambuc 
389*11be35a1SLionel Sambuc 	fail = true;
390*11be35a1SLionel Sambuc 
391*11be35a1SLionel Sambuc #ifdef ENFILE
392*11be35a1SLionel Sambuc 	fail = false;
393*11be35a1SLionel Sambuc #endif
394*11be35a1SLionel Sambuc 
395*11be35a1SLionel Sambuc 	if (fail != false)
396*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENFILE not defined");
397*11be35a1SLionel Sambuc 
398*11be35a1SLionel Sambuc 	fail = true;
399*11be35a1SLionel Sambuc 
400*11be35a1SLionel Sambuc #ifdef ENOBUFS
401*11be35a1SLionel Sambuc 	fail = false;
402*11be35a1SLionel Sambuc #endif
403*11be35a1SLionel Sambuc 
404*11be35a1SLionel Sambuc 	if (fail != false)
405*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOBUFS not defined");
406*11be35a1SLionel Sambuc 
407*11be35a1SLionel Sambuc 	fail = true;
408*11be35a1SLionel Sambuc 
409*11be35a1SLionel Sambuc #ifdef ENODATA
410*11be35a1SLionel Sambuc 	fail = false;
411*11be35a1SLionel Sambuc #endif
412*11be35a1SLionel Sambuc 
413*11be35a1SLionel Sambuc 	if (fail != false)
414*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENODATA not defined");
415*11be35a1SLionel Sambuc 
416*11be35a1SLionel Sambuc 	fail = true;
417*11be35a1SLionel Sambuc 
418*11be35a1SLionel Sambuc #ifdef ENODEV
419*11be35a1SLionel Sambuc 	fail = false;
420*11be35a1SLionel Sambuc #endif
421*11be35a1SLionel Sambuc 
422*11be35a1SLionel Sambuc 	if (fail != false)
423*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENODEV not defined");
424*11be35a1SLionel Sambuc 
425*11be35a1SLionel Sambuc 	fail = true;
426*11be35a1SLionel Sambuc 
427*11be35a1SLionel Sambuc #ifdef ENOENT
428*11be35a1SLionel Sambuc 	fail = false;
429*11be35a1SLionel Sambuc #endif
430*11be35a1SLionel Sambuc 
431*11be35a1SLionel Sambuc 	if (fail != false)
432*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOENT not defined");
433*11be35a1SLionel Sambuc 
434*11be35a1SLionel Sambuc 	fail = true;
435*11be35a1SLionel Sambuc 
436*11be35a1SLionel Sambuc #ifdef ENOEXEC
437*11be35a1SLionel Sambuc 	fail = false;
438*11be35a1SLionel Sambuc #endif
439*11be35a1SLionel Sambuc 
440*11be35a1SLionel Sambuc 	if (fail != false)
441*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOEXEC not defined");
442*11be35a1SLionel Sambuc 
443*11be35a1SLionel Sambuc 	fail = true;
444*11be35a1SLionel Sambuc 
445*11be35a1SLionel Sambuc #ifdef ENOLCK
446*11be35a1SLionel Sambuc 	fail = false;
447*11be35a1SLionel Sambuc #endif
448*11be35a1SLionel Sambuc 
449*11be35a1SLionel Sambuc 	if (fail != false)
450*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOLCK not defined");
451*11be35a1SLionel Sambuc 
452*11be35a1SLionel Sambuc 	fail = true;
453*11be35a1SLionel Sambuc 
454*11be35a1SLionel Sambuc #ifdef ENOLINK
455*11be35a1SLionel Sambuc 	fail = false;
456*11be35a1SLionel Sambuc #endif
457*11be35a1SLionel Sambuc 
458*11be35a1SLionel Sambuc 	if (fail != false)
459*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOLINK not defined");
460*11be35a1SLionel Sambuc 
461*11be35a1SLionel Sambuc 	fail = true;
462*11be35a1SLionel Sambuc 
463*11be35a1SLionel Sambuc #ifdef ENOMEM
464*11be35a1SLionel Sambuc 	fail = false;
465*11be35a1SLionel Sambuc #endif
466*11be35a1SLionel Sambuc 
467*11be35a1SLionel Sambuc 	if (fail != false)
468*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOMEM not defined");
469*11be35a1SLionel Sambuc 
470*11be35a1SLionel Sambuc 	fail = true;
471*11be35a1SLionel Sambuc 
472*11be35a1SLionel Sambuc #ifdef ENOMSG
473*11be35a1SLionel Sambuc 	fail = false;
474*11be35a1SLionel Sambuc #endif
475*11be35a1SLionel Sambuc 
476*11be35a1SLionel Sambuc 	if (fail != false)
477*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOMSG not defined");
478*11be35a1SLionel Sambuc 
479*11be35a1SLionel Sambuc 	fail = true;
480*11be35a1SLionel Sambuc 
481*11be35a1SLionel Sambuc #ifdef ENOPROTOOPT
482*11be35a1SLionel Sambuc 	fail = false;
483*11be35a1SLionel Sambuc #endif
484*11be35a1SLionel Sambuc 
485*11be35a1SLionel Sambuc 	if (fail != false)
486*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOPROTOOPT not defined");
487*11be35a1SLionel Sambuc 
488*11be35a1SLionel Sambuc 	fail = true;
489*11be35a1SLionel Sambuc 
490*11be35a1SLionel Sambuc #ifdef ENOSPC
491*11be35a1SLionel Sambuc 	fail = false;
492*11be35a1SLionel Sambuc #endif
493*11be35a1SLionel Sambuc 
494*11be35a1SLionel Sambuc 	if (fail != false)
495*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOSPC not defined");
496*11be35a1SLionel Sambuc 
497*11be35a1SLionel Sambuc 	fail = true;
498*11be35a1SLionel Sambuc 
499*11be35a1SLionel Sambuc #ifdef ENOSR
500*11be35a1SLionel Sambuc 	fail = false;
501*11be35a1SLionel Sambuc #endif
502*11be35a1SLionel Sambuc 
503*11be35a1SLionel Sambuc 	if (fail != false)
504*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOSR not defined");
505*11be35a1SLionel Sambuc 
506*11be35a1SLionel Sambuc 	fail = true;
507*11be35a1SLionel Sambuc 
508*11be35a1SLionel Sambuc #ifdef ENOSTR
509*11be35a1SLionel Sambuc 	fail = false;
510*11be35a1SLionel Sambuc #endif
511*11be35a1SLionel Sambuc 
512*11be35a1SLionel Sambuc 	if (fail != false)
513*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOSTR not defined");
514*11be35a1SLionel Sambuc 
515*11be35a1SLionel Sambuc 	fail = true;
516*11be35a1SLionel Sambuc 
517*11be35a1SLionel Sambuc #ifdef ENOSYS
518*11be35a1SLionel Sambuc 	fail = false;
519*11be35a1SLionel Sambuc #endif
520*11be35a1SLionel Sambuc 
521*11be35a1SLionel Sambuc 	if (fail != false)
522*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOSYS not defined");
523*11be35a1SLionel Sambuc 
524*11be35a1SLionel Sambuc 	fail = true;
525*11be35a1SLionel Sambuc 
526*11be35a1SLionel Sambuc #ifdef ENOTCONN
527*11be35a1SLionel Sambuc 	fail = false;
528*11be35a1SLionel Sambuc #endif
529*11be35a1SLionel Sambuc 
530*11be35a1SLionel Sambuc 	if (fail != false)
531*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOTCONN not defined");
532*11be35a1SLionel Sambuc 
533*11be35a1SLionel Sambuc 	fail = true;
534*11be35a1SLionel Sambuc 
535*11be35a1SLionel Sambuc #ifdef ENOTDIR
536*11be35a1SLionel Sambuc 	fail = false;
537*11be35a1SLionel Sambuc #endif
538*11be35a1SLionel Sambuc 
539*11be35a1SLionel Sambuc 	if (fail != false)
540*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOTDIR not defined");
541*11be35a1SLionel Sambuc 
542*11be35a1SLionel Sambuc 	fail = true;
543*11be35a1SLionel Sambuc 
544*11be35a1SLionel Sambuc #ifdef ENOTEMPTY
545*11be35a1SLionel Sambuc 	fail = false;
546*11be35a1SLionel Sambuc #endif
547*11be35a1SLionel Sambuc 
548*11be35a1SLionel Sambuc 	if (fail != false)
549*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOTEMPTY not defined");
550*11be35a1SLionel Sambuc 
551*11be35a1SLionel Sambuc 	fail = true;
552*11be35a1SLionel Sambuc 
553*11be35a1SLionel Sambuc #ifdef ENOTRECOVERABLE
554*11be35a1SLionel Sambuc 	fail = false;
555*11be35a1SLionel Sambuc #endif
556*11be35a1SLionel Sambuc 
557*11be35a1SLionel Sambuc 	if (fail != false)
558*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOTRECOVERABLE not defined");
559*11be35a1SLionel Sambuc 
560*11be35a1SLionel Sambuc 	fail = true;
561*11be35a1SLionel Sambuc 
562*11be35a1SLionel Sambuc #ifdef ENOTSOCK
563*11be35a1SLionel Sambuc 	fail = false;
564*11be35a1SLionel Sambuc #endif
565*11be35a1SLionel Sambuc 
566*11be35a1SLionel Sambuc 	if (fail != false)
567*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOTSOCK not defined");
568*11be35a1SLionel Sambuc 
569*11be35a1SLionel Sambuc 	fail = true;
570*11be35a1SLionel Sambuc 
571*11be35a1SLionel Sambuc #ifdef ENOTSUP
572*11be35a1SLionel Sambuc 	fail = false;
573*11be35a1SLionel Sambuc #endif
574*11be35a1SLionel Sambuc 
575*11be35a1SLionel Sambuc 	if (fail != false)
576*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOTSUP not defined");
577*11be35a1SLionel Sambuc 
578*11be35a1SLionel Sambuc 	fail = true;
579*11be35a1SLionel Sambuc 
580*11be35a1SLionel Sambuc #ifdef ENOTTY
581*11be35a1SLionel Sambuc 	fail = false;
582*11be35a1SLionel Sambuc #endif
583*11be35a1SLionel Sambuc 
584*11be35a1SLionel Sambuc 	if (fail != false)
585*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENOTTY not defined");
586*11be35a1SLionel Sambuc 
587*11be35a1SLionel Sambuc 	fail = true;
588*11be35a1SLionel Sambuc 
589*11be35a1SLionel Sambuc #ifdef ENXIO
590*11be35a1SLionel Sambuc 	fail = false;
591*11be35a1SLionel Sambuc #endif
592*11be35a1SLionel Sambuc 
593*11be35a1SLionel Sambuc 	if (fail != false)
594*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ENXIO not defined");
595*11be35a1SLionel Sambuc 
596*11be35a1SLionel Sambuc 	fail = true;
597*11be35a1SLionel Sambuc 
598*11be35a1SLionel Sambuc #ifdef EOPNOTSUPP
599*11be35a1SLionel Sambuc 	fail = false;
600*11be35a1SLionel Sambuc #endif
601*11be35a1SLionel Sambuc 
602*11be35a1SLionel Sambuc 	if (fail != false)
603*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EOPNOTSUPP not defined");
604*11be35a1SLionel Sambuc 
605*11be35a1SLionel Sambuc 	fail = true;
606*11be35a1SLionel Sambuc 
607*11be35a1SLionel Sambuc #ifdef EOVERFLOW
608*11be35a1SLionel Sambuc 	fail = false;
609*11be35a1SLionel Sambuc #endif
610*11be35a1SLionel Sambuc 
611*11be35a1SLionel Sambuc 	if (fail != false)
612*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EOVERFLOW not defined");
613*11be35a1SLionel Sambuc 
614*11be35a1SLionel Sambuc 	fail = true;
615*11be35a1SLionel Sambuc 
616*11be35a1SLionel Sambuc #ifdef EOWNERDEAD
617*11be35a1SLionel Sambuc 	fail = false;
618*11be35a1SLionel Sambuc #endif
619*11be35a1SLionel Sambuc 
620*11be35a1SLionel Sambuc 	if (fail != false)
621*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EOWNERDEAD not defined");
622*11be35a1SLionel Sambuc 
623*11be35a1SLionel Sambuc 	fail = true;
624*11be35a1SLionel Sambuc 
625*11be35a1SLionel Sambuc #ifdef EPERM
626*11be35a1SLionel Sambuc 	fail = false;
627*11be35a1SLionel Sambuc #endif
628*11be35a1SLionel Sambuc 
629*11be35a1SLionel Sambuc 	if (fail != false)
630*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EPERM not defined");
631*11be35a1SLionel Sambuc 
632*11be35a1SLionel Sambuc 	fail = true;
633*11be35a1SLionel Sambuc 
634*11be35a1SLionel Sambuc #ifdef EPIPE
635*11be35a1SLionel Sambuc 	fail = false;
636*11be35a1SLionel Sambuc #endif
637*11be35a1SLionel Sambuc 
638*11be35a1SLionel Sambuc 	if (fail != false)
639*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EPIPE not defined");
640*11be35a1SLionel Sambuc 
641*11be35a1SLionel Sambuc 	fail = true;
642*11be35a1SLionel Sambuc 
643*11be35a1SLionel Sambuc #ifdef EPROTO
644*11be35a1SLionel Sambuc 	fail = false;
645*11be35a1SLionel Sambuc #endif
646*11be35a1SLionel Sambuc 
647*11be35a1SLionel Sambuc 	if (fail != false)
648*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EPROTO not defined");
649*11be35a1SLionel Sambuc 
650*11be35a1SLionel Sambuc 	fail = true;
651*11be35a1SLionel Sambuc 
652*11be35a1SLionel Sambuc #ifdef EPROTONOSUPPORT
653*11be35a1SLionel Sambuc 	fail = false;
654*11be35a1SLionel Sambuc #endif
655*11be35a1SLionel Sambuc 
656*11be35a1SLionel Sambuc 	if (fail != false)
657*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EPROTONOSUPPORT not defined");
658*11be35a1SLionel Sambuc 
659*11be35a1SLionel Sambuc 	fail = true;
660*11be35a1SLionel Sambuc 
661*11be35a1SLionel Sambuc #ifdef EPROTOTYPE
662*11be35a1SLionel Sambuc 	fail = false;
663*11be35a1SLionel Sambuc #endif
664*11be35a1SLionel Sambuc 
665*11be35a1SLionel Sambuc 	if (fail != false)
666*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EPROTOTYPE not defined");
667*11be35a1SLionel Sambuc 
668*11be35a1SLionel Sambuc 	fail = true;
669*11be35a1SLionel Sambuc 
670*11be35a1SLionel Sambuc #ifdef ERANGE
671*11be35a1SLionel Sambuc 	fail = false;
672*11be35a1SLionel Sambuc #endif
673*11be35a1SLionel Sambuc 
674*11be35a1SLionel Sambuc 	if (fail != false)
675*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ERANGE not defined");
676*11be35a1SLionel Sambuc 
677*11be35a1SLionel Sambuc 	fail = true;
678*11be35a1SLionel Sambuc 
679*11be35a1SLionel Sambuc #ifdef EROFS
680*11be35a1SLionel Sambuc 	fail = false;
681*11be35a1SLionel Sambuc #endif
682*11be35a1SLionel Sambuc 
683*11be35a1SLionel Sambuc 	if (fail != false)
684*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EROFS not defined");
685*11be35a1SLionel Sambuc 
686*11be35a1SLionel Sambuc 	fail = true;
687*11be35a1SLionel Sambuc 
688*11be35a1SLionel Sambuc #ifdef ESPIPE
689*11be35a1SLionel Sambuc 	fail = false;
690*11be35a1SLionel Sambuc #endif
691*11be35a1SLionel Sambuc 
692*11be35a1SLionel Sambuc 	if (fail != false)
693*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ESPIPE not defined");
694*11be35a1SLionel Sambuc 
695*11be35a1SLionel Sambuc 	fail = true;
696*11be35a1SLionel Sambuc 
697*11be35a1SLionel Sambuc #ifdef ESRCH
698*11be35a1SLionel Sambuc 	fail = false;
699*11be35a1SLionel Sambuc #endif
700*11be35a1SLionel Sambuc 
701*11be35a1SLionel Sambuc 	if (fail != false)
702*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ESRCH not defined");
703*11be35a1SLionel Sambuc 
704*11be35a1SLionel Sambuc 	fail = true;
705*11be35a1SLionel Sambuc 
706*11be35a1SLionel Sambuc #ifdef ESTALE
707*11be35a1SLionel Sambuc 	fail = false;
708*11be35a1SLionel Sambuc #endif
709*11be35a1SLionel Sambuc 
710*11be35a1SLionel Sambuc 	if (fail != false)
711*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ESTALE not defined");
712*11be35a1SLionel Sambuc 
713*11be35a1SLionel Sambuc 	fail = true;
714*11be35a1SLionel Sambuc 
715*11be35a1SLionel Sambuc #ifdef ETIME
716*11be35a1SLionel Sambuc 	fail = false;
717*11be35a1SLionel Sambuc #endif
718*11be35a1SLionel Sambuc 
719*11be35a1SLionel Sambuc 	if (fail != false)
720*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ETIME not defined");
721*11be35a1SLionel Sambuc 
722*11be35a1SLionel Sambuc 	fail = true;
723*11be35a1SLionel Sambuc 
724*11be35a1SLionel Sambuc #ifdef ETIMEDOUT
725*11be35a1SLionel Sambuc 	fail = false;
726*11be35a1SLionel Sambuc #endif
727*11be35a1SLionel Sambuc 
728*11be35a1SLionel Sambuc 	if (fail != false)
729*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ETIMEDOUT not defined");
730*11be35a1SLionel Sambuc 
731*11be35a1SLionel Sambuc 	fail = true;
732*11be35a1SLionel Sambuc 
733*11be35a1SLionel Sambuc #ifdef ETXTBSY
734*11be35a1SLionel Sambuc 	fail = false;
735*11be35a1SLionel Sambuc #endif
736*11be35a1SLionel Sambuc 
737*11be35a1SLionel Sambuc 	if (fail != false)
738*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("ETXTBSY not defined");
739*11be35a1SLionel Sambuc 
740*11be35a1SLionel Sambuc 	fail = true;
741*11be35a1SLionel Sambuc 
742*11be35a1SLionel Sambuc #ifdef EWOULDBLOCK
743*11be35a1SLionel Sambuc 	fail = false;
744*11be35a1SLionel Sambuc #endif
745*11be35a1SLionel Sambuc 
746*11be35a1SLionel Sambuc 	if (fail != false)
747*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EWOULDBLOCK not defined");
748*11be35a1SLionel Sambuc 
749*11be35a1SLionel Sambuc 	fail = true;
750*11be35a1SLionel Sambuc 
751*11be35a1SLionel Sambuc #ifdef EXDEV
752*11be35a1SLionel Sambuc 	fail = false;
753*11be35a1SLionel Sambuc #endif
754*11be35a1SLionel Sambuc 
755*11be35a1SLionel Sambuc 	if (fail != false)
756*11be35a1SLionel Sambuc 		atf_tc_fail_nonfatal("EXDEV not defined");
757*11be35a1SLionel Sambuc }
758*11be35a1SLionel Sambuc 
ATF_TP_ADD_TCS(tp)759*11be35a1SLionel Sambuc ATF_TP_ADD_TCS(tp)
760*11be35a1SLionel Sambuc {
761*11be35a1SLionel Sambuc 
762*11be35a1SLionel Sambuc 	ATF_TP_ADD_TC(tp, errno_constants);
763*11be35a1SLionel Sambuc 
764*11be35a1SLionel Sambuc 	return atf_no_error();
765*11be35a1SLionel Sambuc }
766