Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Verify PR standards/44921.



details:   https://anonhg.NetBSD.org/src/rev/6c58f579ae3f
branches:  trunk
changeset: 764711:6c58f579ae3f
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun May 01 17:07:05 2011 +0000

description:
Verify PR standards/44921.

diffstat:

 distrib/sets/lists/tests/mi |    4 +-
 tests/include/Makefile      |    3 +-
 tests/include/t_errno.c     |  765 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 770 insertions(+), 2 deletions(-)

diffs (truncated from 811 to 300 lines):

diff -r 7f1a3eb155d0 -r 6c58f579ae3f distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sun May 01 16:36:37 2011 +0000
+++ b/distrib/sets/lists/tests/mi       Sun May 01 17:07:05 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.317 2011/05/01 16:36:37 jruoho Exp $
+# $NetBSD: mi,v 1.318 2011/05/01 17:07:05 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -284,6 +284,7 @@
 ./usr/libdata/debug/usr/tests/include/sys/t_bitops.debug               tests-ipf-tests         debug,atf
 ./usr/libdata/debug/usr/tests/include/sys/t_bootblock.debug            tests-ipf-tests         debug,atf
 ./usr/libdata/debug/usr/tests/include/t_bitstring.debug                        tests-ipf-tests         debug,atf
+./usr/libdata/debug/usr/tests/include/t_errno.debug                    tests-ipf-tests         debug,atf
 ./usr/libdata/debug/usr/tests/include/t_glob.debug                     tests-ipf-tests         debug,atf
 ./usr/libdata/debug/usr/tests/include/t_inttypes.debug                 tests-ipf-tests         debug,atf
 ./usr/libdata/debug/usr/tests/include/t_limits.debug                   tests-ipf-tests         debug,atf
@@ -1382,6 +1383,7 @@
 ./usr/tests/include/sys/t_bitops               tests-include-tests     atf
 ./usr/tests/include/sys/t_bootblock            tests-include-tests     atf
 ./usr/tests/include/t_bitstring                        tests-include-tests     atf
+./usr/tests/include/t_errno                    tests-include-tests     atf
 ./usr/tests/include/t_glob                     tests-include-tests     atf
 ./usr/tests/include/t_inttypes                 tests-include-tests     atf
 ./usr/tests/include/t_limits                   tests-include-tests     atf
diff -r 7f1a3eb155d0 -r 6c58f579ae3f tests/include/Makefile
--- a/tests/include/Makefile    Sun May 01 16:36:37 2011 +0000
+++ b/tests/include/Makefile    Sun May 01 17:07:05 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2011/04/10 10:49:44 jruoho Exp $
+# $NetBSD: Makefile,v 1.6 2011/05/01 17:07:06 jruoho Exp $
 
 NOMAN=         # defined
 
@@ -8,6 +8,7 @@
 TESTS_SUBDIRS= sys
 
 TESTS_C=       t_bitstring
+TESTS_C+=      t_errno
 TESTS_C+=      t_glob
 TESTS_C+=      t_inttypes
 TESTS_C+=      t_limits
diff -r 7f1a3eb155d0 -r 6c58f579ae3f tests/include/t_errno.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/include/t_errno.c   Sun May 01 17:07:05 2011 +0000
@@ -0,0 +1,765 @@
+/*     $NetBSD: t_errno.c,v 1.1 2011/05/01 17:07:05 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jukka Ruohonen.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_errno.c,v 1.1 2011/05/01 17:07:05 jruoho Exp $");
+
+#include <atf-c.h>
+#include <errno.h>
+
+ATF_TC(errno_constants);
+ATF_TC_HEAD(errno_constants, tc)
+{
+       atf_tc_set_md_var(tc, "descr", "Test POSIX constants in <errno.h>");
+}
+
+ATF_TC_BODY(errno_constants, tc)
+{
+       bool fail;
+
+       /*
+        * The following definitions should be available
+        * according to IEEE Std 1003.1-2008, issue 7.
+        */
+       atf_tc_expect_fail("PR standards/44921");
+
+       fail = true;
+
+#ifdef E2BIG
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("E2BIG not defined");
+
+       fail = true;
+
+#ifdef EACCES
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EACCES not defined");
+
+       fail = true;
+
+#ifdef EADDRINUSE
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EADDRINUSE not defined");
+
+       fail = true;
+
+#ifdef EADDRNOTAVAIL
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EADDRNOTAVAIL not defined");
+
+       fail = true;
+
+#ifdef EAFNOSUPPORT
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EAFNOSUPPORT not defined");
+
+       fail = true;
+
+#ifdef EAGAIN
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EAGAIN not defined");
+
+       fail = true;
+
+#ifdef EALREADY
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EALREADY not defined");
+
+       fail = true;
+
+#ifdef EBADF
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EBADF not defined");
+
+       fail = true;
+
+#ifdef EBADMSG
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EBADMSG not defined");
+
+       fail = true;
+
+#ifdef EBUSY
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EBUSY not defined");
+
+       fail = true;
+
+#ifdef ECANCELED
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("ECANCELED not defined");
+
+       fail = true;
+
+#ifdef ECHILD
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("ECHILD not defined");
+
+       fail = true;
+
+#ifdef ECONNABORTED
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("ECONNABORTED not defined");
+
+       fail = true;
+
+#ifdef ECONNREFUSED
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("ECONNREFUSED not defined");
+
+       fail = true;
+
+#ifdef ECONNRESET
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("ECONNRESET not defined");
+
+       fail = true;
+
+#ifdef EDEADLK
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EDEADLK not defined");
+
+       fail = true;
+
+#ifdef EDESTADDRREQ
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EDESTADDRREQ not defined");
+
+       fail = true;
+
+#ifdef EDOM
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EDOM not defined");
+
+       fail = true;
+
+#ifdef EDQUOT
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EDQUOT not defined");
+
+       fail = true;
+
+#ifdef EEXIST
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EEXIST not defined");
+
+       fail = true;
+
+#ifdef EFAULT
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EFAULT not defined");
+
+       fail = true;
+
+#ifdef EFBIG
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EFBIG not defined");
+
+       fail = true;
+
+#ifdef EHOSTUNREACH
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EHOSTUNREACH not defined");
+
+       fail = true;
+
+#ifdef EIDRM
+       fail = false;
+#endif
+       if (fail != false)
+               atf_tc_fail_nonfatal("EIDRM not defined");
+
+       fail = true;
+
+#ifdef EILSEQ
+       fail = false;
+#endif
+
+       if (fail != false)
+               atf_tc_fail_nonfatal("EILSEQ not defined");
+
+       fail = true;



Home | Main Index | Thread Index | Old Index