Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2015 22:44:07 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r291873 - in stable/10: contrib/netbsd-tests/lib/libcrypt lib/libcrypt/tests
Message-ID:  <201512052244.tB5Mi75j034951@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sat Dec  5 22:44:07 2015
New Revision: 291873
URL: https://svnweb.freebsd.org/changeset/base/291873

Log:
  MFC r290908,r291615:
  
  r290908:
  
  Integrate contrib/netbsd-tests/lib/libcrypt/t_crypt.c in to the FreeBSD
  test suite as lib/libcrypt/crypt_test
  
  Sponsored by: EMC / Isilon Storage Division
  
  r291615 (by rodrigc):
  
  Hack test so that it works on FreeBSD.

Modified:
  stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c
  stable/10/lib/libcrypt/tests/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c	Sat Dec  5 22:07:02 2015	(r291872)
+++ stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c	Sat Dec  5 22:44:07 2015	(r291873)
@@ -124,11 +124,13 @@ ATF_TC_HEAD(crypt_salts, tc)
 ATF_TC_BODY(crypt_salts, tc)
 {
 	for (size_t i = 0; tests[i].hash; i++) {
+		char *hash = crypt(tests[i].pw, tests[i].hash);
 #if defined(__FreeBSD__)
-		if (22 <= i)
+		if (i >= 22 && i != 24 && i != 25)
 			atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD");
+		else
+			atf_tc_expect_pass();
 #endif
-		char *hash = crypt(tests[i].pw, tests[i].hash);
 		if (!hash) {
 			ATF_CHECK_MSG(0, "Test %zu NULL\n", i);
 			continue;

Modified: stable/10/lib/libcrypt/tests/Makefile
==============================================================================
--- stable/10/lib/libcrypt/tests/Makefile	Sat Dec  5 22:07:02 2015	(r291872)
+++ stable/10/lib/libcrypt/tests/Makefile	Sat Dec  5 22:44:07 2015	(r291873)
@@ -1,13 +1,17 @@
 # $FreeBSD$
 
-# exercise libcrypt
+SRCTOP=		${.CURDIR:H:H:H}
+OBJTOP=		${.OBJDIR:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libcrypt
 
 TESTSDIR= ${TESTSBASE}/lib/libcrypt
 
-ATF_TESTS_C= crypt_tests
+NETBSD_ATF_TESTS_C+= crypt_test
 
 CFLAGS+= -I${.CURDIR:H}
 DPADD+=	${LIBCRYPT}
 LDADD+= -lcrypt
 
+.include <netbsd-tests.test.mk>
+
 .include <bsd.test.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512052244.tB5Mi75j034951>