Source-Changes-HG archive

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

[src/trunk]: src/regress/lib/libc Remove atf-ified tests: servent protoent md...



details:   https://anonhg.NetBSD.org/src/rev/334ff51c3b7a
branches:  trunk
changeset: 760339:334ff51c3b7a
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sun Jan 02 22:10:23 2011 +0000

description:
Remove atf-ified tests: servent protoent md5sha

diffstat:

 regress/lib/libc/Makefile             |    6 +-
 regress/lib/libc/md5sha/Makefile      |   17 ---
 regress/lib/libc/md5sha/md5test-in    |    7 -
 regress/lib/libc/md5sha/md5test-out   |    7 -
 regress/lib/libc/md5sha/sha1test-in   |    2 -
 regress/lib/libc/md5sha/sha1test-out  |    2 -
 regress/lib/libc/md5sha/sha1test2-out |    1 -
 regress/lib/libc/md5sha/test.c        |  167 ----------------------------------
 regress/lib/libc/protoent/Makefile    |   10 --
 regress/lib/libc/protoent/protoent.c  |   23 ----
 regress/lib/libc/servent/Makefile     |   10 --
 regress/lib/libc/servent/servent.c    |   72 --------------
 12 files changed, 3 insertions(+), 321 deletions(-)

diffs (truncated from 376 to 300 lines):

diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/Makefile
--- a/regress/lib/libc/Makefile Sun Jan 02 22:06:40 2011 +0000
+++ b/regress/lib/libc/Makefile Sun Jan 02 22:10:23 2011 +0000
@@ -1,7 +1,7 @@
-#      $NetBSD: Makefile,v 1.70 2011/01/02 03:59:34 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.71 2011/01/02 22:10:23 pgoyette Exp $
 
-SUBDIR+= atexit citrus db divrem getaddrinfo int_fmtio locale md5sha \
-       nsdispatch regex rpc servent sys time
+SUBDIR+= atexit citrus db divrem getaddrinfo int_fmtio locale \
+       nsdispatch regex rpc sys time
 
 .include <bsd.own.mk>
 .include <bsd.sys.mk>
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/md5sha/Makefile
--- a/regress/lib/libc/md5sha/Makefile  Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#      $NetBSD: Makefile,v 1.4 2003/09/30 04:20:24 mycroft Exp $
-
-NOMAN=         # defined
-LDSTATIC=      -static
-
-PROG=          test
-WARNS=         1
-
-# MD5 tests from RFC1321
-# SHA1 tests from FIPS-180-1
-
-regress:
-       ./test -r < ${.CURDIR}/md5test-in | diff ${.CURDIR}/md5test-out -
-       ./test -rs < ${.CURDIR}/sha1test-in | diff ${.CURDIR}/sha1test-out -
-       jot -s "" -b "a" -n 1000000 | ./test -rs | diff ${.CURDIR}/sha1test2-out -
-
-.include <bsd.prog.mk>
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/md5sha/md5test-in
--- a/regress/lib/libc/md5sha/md5test-in        Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-
-a
-abc
-message digest
-abcdefghijklmnopqrstuvwxyz
-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
-12345678901234567890123456789012345678901234567890123456789012345678901234567890
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/md5sha/md5test-out
--- a/regress/lib/libc/md5sha/md5test-out       Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-d41d8cd98f00b204e9800998ecf8427e
-0cc175b9c0f1b6a831c399e269772661
-900150983cd24fb0d6963f7d28e17f72
-f96b697d7cb7938d525a2f31aaf161d0
-c3fcd3d76192e4007dfb496cca67e13b
-d174ab98d277d9f5a5611c2c9f419d9f
-57edf4a22be3c955ac49da2e2107b67a
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/md5sha/sha1test-in
--- a/regress/lib/libc/md5sha/sha1test-in       Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-abc
-abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/md5sha/sha1test-out
--- a/regress/lib/libc/md5sha/sha1test-out      Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-a9993e364706816aba3e25717850c26c9cd0d89d
-84983e441c3bd26ebaae4aa1f95129e5e54670f1
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/md5sha/sha1test2-out
--- a/regress/lib/libc/md5sha/sha1test2-out     Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-34aa973cd4c4daa4f61eeb2bdbad27316534016f
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/md5sha/test.c
--- a/regress/lib/libc/md5sha/test.c    Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*     $NetBSD: test.c,v 1.6 2008/04/28 20:23:05 martin Exp $  */
-
-/*-
- * Copyright (c) 2000 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.
- */
-
-/*
- * Combined MD5/SHA1 time and regression test.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <md5.h>
-#include <sha1.h>
-
-
-int mflag, rflag, sflag, tflag;
-
-static void
-usage(void)
-{
-       (void)fprintf(stderr,
-           "Usage:\t%s -r[ms] < test-file\n"
-           "\t%s -t[ms]\n",
-           getprogname(), getprogname());
-       exit(1);
-       /* NOTREACHED */
-}
-
-static void
-hexdump (unsigned char *buf, int len)
-{
-       int i;
-       for (i=0; i<len; i++) {
-               printf("%02x", buf[i]);
-       }
-       printf("\n");
-}
-
-
-static void
-timetest(void)
-{
-       printf("sorry, not yet\n");
-}
-
-#define CHOMP(buf, len, last)                          \
-       if ((len > 0) &&                                \
-           (buf[len-1] == '\n')) {                     \
-               buf[len-1] = '\0';                      \
-               len--;                                  \
-               last = 1;                               \
-       }
-
-static void
-regress(void)
-{
-       unsigned char buf[1024];
-       unsigned char out[20];
-       int len, outlen, last;
-       
-       while (fgets((char *)buf, sizeof(buf), stdin) != NULL) {
-               last = 0;
-
-               len = strlen((char *)buf);
-               CHOMP(buf, len, last);
-               if (mflag) {
-                       MD5_CTX ctx;
-
-                       MD5Init(&ctx);
-                       MD5Update(&ctx, buf, len);
-                       while (!last &&
-                           fgets((char *)buf, sizeof(buf), stdin) != NULL) {
-                               len = strlen((char *)buf);
-                               CHOMP(buf, len, last);
-                               MD5Update(&ctx, buf, len);
-                       }
-                       MD5Final(out, &ctx);
-                       outlen = 16;
-               } else {
-                       SHA1_CTX ctx;
-
-                       SHA1Init(&ctx);
-                       SHA1Update(&ctx, buf, len);
-                       while (!last &&
-                           fgets((char *)buf, sizeof(buf), stdin) != NULL) {
-                               len = strlen((char *)buf);
-                               CHOMP(buf, len, last);                          
-                               SHA1Update(&ctx, buf, len);
-                       }
-                       SHA1Final(out, &ctx);
-                       outlen = 20;
-               }
-               hexdump(out, outlen);
-       }
-}
-
-int
-main(int argc, char **argv)
-{
-       int ch;
-
-       while ((ch = getopt(argc, argv, "mrst")) != -1)
-               switch (ch) {
-               case 'm':
-                       mflag = 1;
-                       break;
-               case 'r':
-                       rflag = 1;
-                       break;
-               case 's':
-                       sflag = 1;
-                       break;
-               case 't':
-                       tflag = 1;
-                       break;
-               case '?':
-               default:
-                       usage();
-               }
-       argc -= optind;
-       argv += optind;
-       if (argc > 0)
-               usage();
-
-       if (!(mflag || sflag))
-               mflag = 1;
-
-       if ((mflag ^ sflag) != 1)
-               usage();
-
-       if ((tflag ^ rflag) != 1)
-               usage();
-
-       if (tflag)
-               timetest();
-
-       if (rflag)
-               regress();
-       
-       exit(0);
-       
-}
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/protoent/Makefile
--- a/regress/lib/libc/protoent/Makefile        Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#      $NetBSD: Makefile,v 1.3 2004/03/02 14:27:25 drochner Exp $
-
-NOMAN= # defined
-
-PROG=  protoent
-
-regress: ${PROG}
-       ${.CURDIR}/../servent/compare /etc/protocols ${.OBJDIR}/${PROG}
-
-.include <bsd.prog.mk>
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/protoent/protoent.c
--- a/regress/lib/libc/protoent/protoent.c      Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#include <netdb.h>
-#include <stdint.h>
-#include <netinet/in.h>
-
-int
-main(int argc, char *argv[])
-{
-       struct protoent_data pvd;
-       struct protoent *pvp, pv;
-       char **pp;
-
-       (void)memset(&pvd, 0, sizeof(pvd));
-       setprotoent_r(0, &pvd);
-       while ((pvp = getprotoent_r(&pv, &pvd)) != NULL) {
-               printf("name=%s, port=%d, aliases=",
-                   pvp->p_name, pvp->p_proto);
-               for (pp = pvp->p_aliases; *pp; pp++)
-                       printf("%s ", *pp);
-               printf("\n");
-       }
-       endprotoent_r(&pvd);
-       return 0;
-}
diff -r 68039fa354e2 -r 334ff51c3b7a regress/lib/libc/servent/Makefile
--- a/regress/lib/libc/servent/Makefile Sun Jan 02 22:06:40 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#      $NetBSD: Makefile,v 1.4 2004/03/02 14:27:25 drochner Exp $
-
-NOMAN= # defined
-
-PROG=  servent
-
-regress: ${PROG}
-       ${.CURDIR}/compare /etc/services ${.OBJDIR}/${PROG}
-
-.include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index