Convert the threads libcrypto test to ATF and enable it. Drop the old one

in regress.
This commit is contained in:
jmmv 2009-02-13 22:01:48 +00:00
parent 44d668a632
commit 3baa49a10f
5 changed files with 43 additions and 20 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.29 2009/02/13 20:58:13 jmmv Exp $
# $NetBSD: mi,v 1.30 2009/02/13 22:01:48 jmmv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -94,6 +94,7 @@
./usr/libdata/debug/usr/tests/crypto/libcrypto/h_rsatest.debug tests-crypto-debug debug
./usr/libdata/debug/usr/tests/crypto/libcrypto/h_sha1test.debug tests-crypto-debug debug
./usr/libdata/debug/usr/tests/crypto/libcrypto/h_shatest.debug tests-crypto-debug debug
./usr/libdata/debug/usr/tests/crypto/libcrypto/h_threadstest.debug tests-crypto-debug debug
./usr/libdata/debug/usr/tests/crypto/libcrypto/h_x509v3test.debug tests-crypto-debug debug
./usr/libdata/debug/usr/tests/fs tests-fs-debug
./usr/libdata/debug/usr/tests/fs/puffs tests-fs-debug
@ -392,6 +393,8 @@
./usr/tests/crypto/libcrypto/Atffile tests-crypto-tests
./usr/tests/crypto/libcrypto/d_conf.out tests-crypto-tests
./usr/tests/crypto/libcrypto/d_conf_ssleay.cnf tests-crypto-tests
./usr/tests/crypto/libcrypto/d_client.pem tests-crypto-tests
./usr/tests/crypto/libcrypto/d_server.pem tests-crypto-tests
./usr/tests/crypto/libcrypto/h_bftest tests-crypto-tests
./usr/tests/crypto/libcrypto/h_bntest tests-crypto-tests
./usr/tests/crypto/libcrypto/h_casttest tests-crypto-tests
@ -420,6 +423,7 @@
./usr/tests/crypto/libcrypto/h_rsatest tests-crypto-tests
./usr/tests/crypto/libcrypto/h_sha1test tests-crypto-tests
./usr/tests/crypto/libcrypto/h_shatest tests-crypto-tests
./usr/tests/crypto/libcrypto/h_threadstest tests-crypto-tests
./usr/tests/crypto/libcrypto/h_x509v3test tests-crypto-tests
./usr/tests/crypto/libcrypto/t_libcrypto tests-crypto-tests
./usr/tests/fs tests-fs-tests

View File

@ -1,16 +0,0 @@
# $NetBSD: Makefile,v 1.6 2005/03/09 03:11:22 christos Exp $
NOMAN= # defined
PROG= threadstest
SRCS= mttest.c
DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBCRYPT}
LDADD+= -lssl -lcrypto -lcrypt
regress: ${PROG}
@echo "==> running ${PROG}"
@./${PROG}
.include <bsd.prog.mk>
.PATH: ${OPENSSLSRC}/crypto/threads

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.2 2009/02/13 21:33:27 jmmv Exp $
# $NetBSD: Makefile,v 1.3 2009/02/13 22:01:49 jmmv Exp $
.include <bsd.own.mk>
SUBDIR+=bf bn cast conf des dh dsa ec ecdh ecdsa engine hmac lhash \
md2 md4 md5 rand rc2 rc4 ripemd rsa sha sha1 x509v3
md2 md4 md5 rand rc2 rc4 ripemd rsa sha sha1 threads x509v3
.if ${MKCRYPTO_IDEA} != "no"
SUBDIR+=idea

View File

@ -1,4 +1,4 @@
# $NetBSD: t_libcrypto.in,v 1.1 2009/02/13 20:58:14 jmmv Exp $
# $NetBSD: t_libcrypto.in,v 1.2 2009/02/13 22:01:49 jmmv Exp $
#
# Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
# All rights reserved.
@ -135,6 +135,20 @@ lhash_body()
"echo hoge | $(atf_get_srcdir)/h_lhashtest"
}
atf_test_case threads
threads_head()
{
atf_set "descr" "Checks threading"
}
threads_body()
{
$(atf_get_srcdir)/h_threadstest \
-cert $(atf_get_srcdir)/d_server.pem \
-ccert $(atf_get_srcdir)/d_client.pem \
2>&1 | tee out
atf_check -s eq:1 -o empty -e empty grep :error: out
}
atf_init_test_cases()
{
tc_list

View File

@ -0,0 +1,21 @@
# $NetBSD: Makefile,v 1.1 2009/02/13 22:01:49 jmmv Exp $
HELPER_NAME= threadstest
HELPER_DIR= md5
HELPER_SRCS= mttest.c
CPPFLAGS+= -DPTHREADS
CFLAGS+= -pthread
DPADD+= ${LIBPTHREAD} ${LIBSSL}
LDADD+= -lpthread -lssl
FILESDIR= ${TESTSDIR}
FILES= server.pem
FILESNAME_server.pem= d_server.pem
FILES+= client.pem
FILESNAME_client.pem= d_client.pem
.include <bsd.init.mk>
.PATH: ${OPENSSLSRC}/apps