Source-Changes-HG archive

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

[src/trunk]: src/regress/lib Remove tests converted to ATF.



details:   https://anonhg.NetBSD.org/src/rev/4e55164721b4
branches:  trunk
changeset: 756402:4e55164721b4
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Fri Jul 16 13:59:07 2010 +0000

description:
Remove tests converted to ATF.

diffstat:

 regress/lib/Makefile                                      |    8 +-
 regress/lib/libposix/Makefile                             |    5 -
 regress/lib/libposix/Makefile.inc                         |    4 -
 regress/lib/libposix/nrn/Makefile                         |   15 -
 regress/lib/libposix/prename.c                            |  100 -------
 regress/lib/libposix/prn1/Makefile                        |   16 -
 regress/lib/libposix/prn2/Makefile                        |   15 -
 regress/lib/libprop/proptest.c                            |  153 -----------
 regress/lib/librt/Makefile                                |    5 -
 regress/lib/librt/sem/Makefile                            |   13 -
 regress/lib/librt/sem/sem.c                               |  179 --------------
 regress/lib/libskey/Makefile                              |   16 -
 regress/lib/libskey/skeytest.c                            |  112 --------
 regress/lib/libutil/Makefile                              |    5 -
 regress/lib/libutil/Makefile.inc                          |    4 -
 regress/lib/libutil/snprintb/Makefile                     |   12 -
 regress/lib/libutil/snprintb/snprintbtest.c               |   71 -----
 regress/lib/libutil/sockaddr_snprintf/Makefile            |   19 -
 regress/lib/libutil/sockaddr_snprintf/sockaddr_snprintf.c |  163 ------------
 19 files changed, 2 insertions(+), 913 deletions(-)

diffs (truncated from 1004 to 300 lines):

diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/Makefile
--- a/regress/lib/Makefile      Fri Jul 16 13:57:16 2010 +0000
+++ b/regress/lib/Makefile      Fri Jul 16 13:59:07 2010 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: Makefile,v 1.22 2009/11/02 15:44:12 plunky Exp $
+#      $NetBSD: Makefile,v 1.23 2010/07/16 13:59:07 jmmv Exp $
 
 .include <bsd.own.mk>
 
-SUBDIR+= csu libc libm libposix libpthread librt libutil
+SUBDIR+= csu libc libm libpthread
 
 .if (${MACHINE_CPU} != "alpha" && \
      ${MACHINE_CPU} != "mips" && \
@@ -10,10 +10,6 @@
 #SUBDIR+= libssp
 .endif
 
-.if (${MKSKEY} != "no")
-SUBDIR+= libskey
-.endif
-
 .if ${MKCRYPTO} != "no"
 SUBDIR+= libdes
 .endif
diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/libposix/Makefile
--- a/regress/lib/libposix/Makefile     Fri Jul 16 13:57:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-#      $NetBSD: Makefile,v 1.1 1999/02/21 00:20:11 mjl Exp $
-
-SUBDIR=        prn1 prn2 nrn
-
-.include <bsd.subdir.mk>
diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/libposix/Makefile.inc
--- a/regress/lib/libposix/Makefile.inc Fri Jul 16 13:57:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-#      $NetBSD: Makefile.inc,v 1.1 1999/02/21 00:20:11 mjl Exp $
-#
-# do not install regression test programs
-proginstall::
diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/libposix/nrn/Makefile
--- a/regress/lib/libposix/nrn/Makefile Fri Jul 16 13:57:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#      $NetBSD: Makefile,v 1.4 2002/09/18 05:41:49 lukem Exp $
-
-NOMAN=         # defined
-
-PROG=          prename
-CPPFLAGS+=     -DBSD_RENAME
-CLEANFILES+=   t1 t2
-
-.PATH:         ${.CURDIR}/..
-
-regress:
-       @echo Testing BSD rename
-       ./prename
-
-.include <bsd.prog.mk>
diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/libposix/prename.c
--- a/regress/lib/libposix/prename.c    Fri Jul 16 13:57:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*     $NetBSD: prename.c,v 1.3 2008/04/28 20:23:05 martin Exp $       */
-
-/*-
- * Copyright (c) 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int main(void)
-{
-       int errors = 0;
-       struct stat sb;
-
-       (void)unlink("t1");
-       (void)unlink("t2");
-       if (creat("t1", 0600) < 0) {
-               perror("create t1");
-               exit(1);
-       }
-
-       if (link("t1", "t2")) {
-               perror("link t1 t2");
-               exit(1);
-       }
-
-       /* Check if rename to same name works as expected */
-       if (rename("t1", "t1")) {
-               perror("rename t1 t1");
-               errors++;
-       }
-       if (stat("t1", &sb)) {
-               perror("rename removed file? stat t1");
-               exit(1);
-       }
-
-       if (rename("t1", "t2")) {
-               perror("rename t1 t2");
-               errors++;
-       }
-#if BSD_RENAME
-       /* check if rename of hardlinked file works the BSD way */
-       if (stat("t1", &sb)) {
-               if (errno != ENOENT) {
-                       perror("BSD rename should remove file! stat t1");
-                       errors++;
-               }
-       } else {
-               fprintf(stderr, "BSD rename should remove file!");
-               errors++;
-       }
-#else
-       /* check if rename of hardlinked file works as the standard says */
-       if (stat("t1", &sb)) {
-               perror("Posix rename should not remove file! stat t1");
-               errors++;
-       }
-#endif
-
-       /* check if we get the expected error */
-       /* this also exercises icky shared libraries goo */
-       if (rename("no/such/file/or/dir", "no/such/file/or/dir")) {
-               if (errno != ENOENT) {
-                       perror("rename no/such/file/or/dir");
-                       errors++;
-               }
-       } else {
-               fprintf(stderr, "No error renaming no/such/file/or/dir\n");
-               errors++;
-       }
-       
-       exit(errors ? 1 : 0);
-}
diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/libposix/prn1/Makefile
--- a/regress/lib/libposix/prn1/Makefile        Fri Jul 16 13:57:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#      $NetBSD: Makefile,v 1.4 2002/09/18 05:41:49 lukem Exp $
-
-NOMAN=         # defined
-
-PROG=          prename
-CLEANFILES+=   t1 t2
-DPADD+=                ${LIBPOSIX}
-LDADD+=                -lposix
-
-.PATH:         ${.CURDIR}/..
-
-regress:
-       @echo Testing posix rename with -lposix
-       ./prename
-
-.include <bsd.prog.mk>
diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/libposix/prn2/Makefile
--- a/regress/lib/libposix/prn2/Makefile        Fri Jul 16 13:57:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#      $NetBSD: Makefile,v 1.4 2002/09/18 05:41:49 lukem Exp $
-
-NOMAN=         # defined
-
-PROG=          prename
-CPPFLAGS+=     -D_POSIX_SOURCE
-CLEANFILES+=   t1 t2
-
-.PATH:         ${.CURDIR}/..
-
-regress:
-       @echo Testing posix rename with -D_POSIX_SOURCE
-       ./prename
-
-.include <bsd.prog.mk>
diff -r 5c688644ad1e -r 4e55164721b4 regress/lib/libprop/proptest.c
--- a/regress/lib/libprop/proptest.c    Fri Jul 16 13:57:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*     $NetBSD: proptest.c,v 1.3 2008/05/25 20:47:30 christos Exp $    */
-
-/*
- * Test basic proplib functionality.
- *
- * Written by Jason Thorpe 5/26/2006.
- * Public domain.
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <prop/proplib.h>
-
-static const char compare1[] =
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\";>\n"
-"<plist version=\"1.0\">\n"
-"<dict>\n"
-"      <key>false-val</key>\n"
-"      <false/>\n"
-"      <key>one</key>\n"
-"      <integer>1</integer>\n"
-"      <key>three</key>\n"
-"      <array>\n"
-"              <dict>\n"
-"                      <key>one</key>\n"
-"                      <integer>1</integer>\n"
-"                      <key>two</key>\n"
-"                      <string>number-two</string>\n"
-"              </dict>\n"
-"              <dict>\n"
-"                      <key>one</key>\n"
-"                      <integer>1</integer>\n"
-"                      <key>two</key>\n"
-"                      <string>number-two</string>\n"
-"              </dict>\n"
-"              <dict>\n"
-"                      <key>one</key>\n"
-"                      <integer>1</integer>\n"
-"                      <key>two</key>\n"
-"                      <string>number-two</string>\n"
-"              </dict>\n"
-"      </array>\n"
-"      <key>true-val</key>\n"
-"      <true/>\n"
-"      <key>two</key>\n"
-"      <string>number-two</string>\n"
-"</dict>\n"
-"</plist>\n";
-
-int
-main(int argc, char *argv[])
-{
-       prop_dictionary_t dict;
-       char *ext1;
-       size_t idx;
-
-       dict = prop_dictionary_create();
-       assert(dict != NULL);
-
-       {
-               prop_number_t num = prop_number_create_integer(1);
-               assert(num != NULL);
-
-               assert(prop_dictionary_set(dict, "one", num) == true);
-               prop_object_release(num);
-       }
-
-       {
-               prop_string_t str = prop_string_create_cstring("number-two");
-               assert(str != NULL);
-
-               assert(prop_dictionary_set(dict, "two", str) == true);
-               prop_object_release(str);
-       }
-
-       {
-               prop_array_t arr;
-               prop_dictionary_t dict_copy;
-
-               arr = prop_array_create();
-               assert(arr != NULL);
-
-               dict_copy = prop_dictionary_copy(dict);
-               assert(dict_copy != NULL);
-               assert(prop_array_add(arr, dict_copy) == true);
-               prop_object_release(dict_copy);
-
-               dict_copy = prop_dictionary_copy(dict);



Home | Main Index | Thread Index | Old Index