1 /* $NetBSD: t_errno.c,v 1.1 2011/05/01 17:07:05 jruoho Exp $ */
4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
31 #include <sys/cdefs.h>
32 __RCSID("$NetBSD: t_errno.c,v 1.1 2011/05/01 17:07:05 jruoho Exp $");
37 ATF_TC(errno_constants
);
38 ATF_TC_HEAD(errno_constants
, tc
)
40 atf_tc_set_md_var(tc
, "descr", "Test POSIX constants in <errno.h>");
43 ATF_TC_BODY(errno_constants
, tc
)
48 * The following definitions should be available
49 * according to IEEE Std 1003.1-2008, issue 7.
51 atf_tc_expect_fail("PR standards/44921");
59 atf_tc_fail_nonfatal("E2BIG not defined");
67 atf_tc_fail_nonfatal("EACCES not defined");
75 atf_tc_fail_nonfatal("EADDRINUSE not defined");
83 atf_tc_fail_nonfatal("EADDRNOTAVAIL not defined");
91 atf_tc_fail_nonfatal("EAFNOSUPPORT not defined");
99 atf_tc_fail_nonfatal("EAGAIN not defined");
107 atf_tc_fail_nonfatal("EALREADY not defined");
115 atf_tc_fail_nonfatal("EBADF not defined");
123 atf_tc_fail_nonfatal("EBADMSG not defined");
131 atf_tc_fail_nonfatal("EBUSY not defined");
139 atf_tc_fail_nonfatal("ECANCELED not defined");
147 atf_tc_fail_nonfatal("ECHILD not defined");
155 atf_tc_fail_nonfatal("ECONNABORTED not defined");
163 atf_tc_fail_nonfatal("ECONNREFUSED not defined");
171 atf_tc_fail_nonfatal("ECONNRESET not defined");
179 atf_tc_fail_nonfatal("EDEADLK not defined");
187 atf_tc_fail_nonfatal("EDESTADDRREQ not defined");
195 atf_tc_fail_nonfatal("EDOM not defined");
203 atf_tc_fail_nonfatal("EDQUOT not defined");
211 atf_tc_fail_nonfatal("EEXIST not defined");
219 atf_tc_fail_nonfatal("EFAULT not defined");
227 atf_tc_fail_nonfatal("EFBIG not defined");
235 atf_tc_fail_nonfatal("EHOSTUNREACH not defined");
243 atf_tc_fail_nonfatal("EIDRM not defined");
252 atf_tc_fail_nonfatal("EILSEQ not defined");
261 atf_tc_fail_nonfatal("EINPROGRESS not defined");
270 atf_tc_fail_nonfatal("EINTR not defined");
279 atf_tc_fail_nonfatal("EINVAL not defined");
288 atf_tc_fail_nonfatal("EIO not defined");
297 atf_tc_fail_nonfatal("EISCONN not defined");
306 atf_tc_fail_nonfatal("EISDIR not defined");
315 atf_tc_fail_nonfatal("ELOOP not defined");
324 atf_tc_fail_nonfatal("EMFILE not defined");
333 atf_tc_fail_nonfatal("EMLINK not defined");
342 atf_tc_fail_nonfatal("EMSGSIZE not defined");
351 atf_tc_fail_nonfatal("EMULTIHOP not defined");
360 atf_tc_fail_nonfatal("ENAMETOOLONG not defined");
369 atf_tc_fail_nonfatal("ENETDOWN not defined");
378 atf_tc_fail_nonfatal("ENETRESET not defined");
387 atf_tc_fail_nonfatal("ENETUNREACH not defined");
396 atf_tc_fail_nonfatal("ENFILE not defined");
405 atf_tc_fail_nonfatal("ENOBUFS not defined");
414 atf_tc_fail_nonfatal("ENODATA not defined");
423 atf_tc_fail_nonfatal("ENODEV not defined");
432 atf_tc_fail_nonfatal("ENOENT not defined");
441 atf_tc_fail_nonfatal("ENOEXEC not defined");
450 atf_tc_fail_nonfatal("ENOLCK not defined");
459 atf_tc_fail_nonfatal("ENOLINK not defined");
468 atf_tc_fail_nonfatal("ENOMEM not defined");
477 atf_tc_fail_nonfatal("ENOMSG not defined");
486 atf_tc_fail_nonfatal("ENOPROTOOPT not defined");
495 atf_tc_fail_nonfatal("ENOSPC not defined");
504 atf_tc_fail_nonfatal("ENOSR not defined");
513 atf_tc_fail_nonfatal("ENOSTR not defined");
522 atf_tc_fail_nonfatal("ENOSYS not defined");
531 atf_tc_fail_nonfatal("ENOTCONN not defined");
540 atf_tc_fail_nonfatal("ENOTDIR not defined");
549 atf_tc_fail_nonfatal("ENOTEMPTY not defined");
553 #ifdef ENOTRECOVERABLE
558 atf_tc_fail_nonfatal("ENOTRECOVERABLE not defined");
567 atf_tc_fail_nonfatal("ENOTSOCK not defined");
576 atf_tc_fail_nonfatal("ENOTSUP not defined");
585 atf_tc_fail_nonfatal("ENOTTY not defined");
594 atf_tc_fail_nonfatal("ENXIO not defined");
603 atf_tc_fail_nonfatal("EOPNOTSUPP not defined");
612 atf_tc_fail_nonfatal("EOVERFLOW not defined");
621 atf_tc_fail_nonfatal("EOWNERDEAD not defined");
630 atf_tc_fail_nonfatal("EPERM not defined");
639 atf_tc_fail_nonfatal("EPIPE not defined");
648 atf_tc_fail_nonfatal("EPROTO not defined");
652 #ifdef EPROTONOSUPPORT
657 atf_tc_fail_nonfatal("EPROTONOSUPPORT not defined");
666 atf_tc_fail_nonfatal("EPROTOTYPE not defined");
675 atf_tc_fail_nonfatal("ERANGE not defined");
684 atf_tc_fail_nonfatal("EROFS not defined");
693 atf_tc_fail_nonfatal("ESPIPE not defined");
702 atf_tc_fail_nonfatal("ESRCH not defined");
711 atf_tc_fail_nonfatal("ESTALE not defined");
720 atf_tc_fail_nonfatal("ETIME not defined");
729 atf_tc_fail_nonfatal("ETIMEDOUT not defined");
738 atf_tc_fail_nonfatal("ETXTBSY not defined");
747 atf_tc_fail_nonfatal("EWOULDBLOCK not defined");
756 atf_tc_fail_nonfatal("EXDEV not defined");
762 ATF_TP_ADD_TC(tp
, errno_constants
);
764 return atf_no_error();