mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 09:12:44 +00:00
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.
This commit is contained in:
parent
eb269574d5
commit
e695fba8af
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=291873
@ -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++) {
|
||||
#if defined(__FreeBSD__)
|
||||
if (22 <= i)
|
||||
atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD");
|
||||
#endif
|
||||
char *hash = crypt(tests[i].pw, tests[i].hash);
|
||||
#if defined(__FreeBSD__)
|
||||
if (i >= 22 && i != 24 && i != 25)
|
||||
atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD");
|
||||
else
|
||||
atf_tc_expect_pass();
|
||||
#endif
|
||||
if (!hash) {
|
||||
ATF_CHECK_MSG(0, "Test %zu NULL\n", i);
|
||||
continue;
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user