build openbsd memmem implementation for explicit_bzero test

memmem is not always available, and not all memmem's work the same way

ok beck@ guenther@
This commit is contained in:
Brent Cook 2014-07-21 18:57:06 -05:00
parent 451dbd967c
commit ea6e7116c9
3 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@ -47,6 +47,7 @@ tests/mont*
tests/timingsafe*
tests/*test
tests/*test.c
tests/memmem.c
tests/*.pem
tests/testssl
tests/*.txt

View File

@ -22,4 +22,7 @@ int timingsafe_bcmp(const void *b1, const void *b2, size_t n);
int timingsafe_memcmp(const void *b1, const void *b2, size_t len);
void * memmem(const void *big, size_t big_len, const void *little,
size_t little_len);
#endif

View File

@ -312,10 +312,11 @@ tests_disabled=(
biotest
pidwraptest
)
$CP $libc_src/string/memmem.c tests/
(cd tests
$CP Makefile.am.tpl Makefile.am
for i in `ls -1 *.c|sort`; do
for i in `ls -1 *.c|sort|grep -v memmem.c`; do
TEST=`echo $i|sed -e "s/\.c//"`
if ! [[ ${test_drivers[*]} =~ "$TEST" ]]; then
echo "TESTS += $TEST" >> Makefile.am
@ -325,6 +326,7 @@ tests_disabled=(
echo "${TEST}_LDADD = \$(top_builddir)/ssl/libssl.la" >> Makefile.am
echo "${TEST}_LDADD += \$(top_builddir)/crypto/libcrypto.la" >> Makefile.am
done
echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am
)
$CP $libcrypto_regress/evp/evptests.txt tests
$CP $libcrypto_regress/aead/aeadtests.txt tests