tests: Setup Leak Sanitizer suppressions for OpenSSL
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Этот коммит содержится в:
родитель
0128ed0d2c
Коммит
21ef488121
@ -249,6 +249,7 @@ if (CLIENT_TESTING OR SERVER_TESTING)
|
||||
list(APPEND TORTURE_ENVIRONMENT NSS_WRAPPER_SHADOW=${CMAKE_CURRENT_BINARY_DIR}/etc/shadow)
|
||||
list(APPEND TORTURE_ENVIRONMENT NSS_WRAPPER_GROUP=${CMAKE_CURRENT_BINARY_DIR}/etc/group)
|
||||
list(APPEND TORTURE_ENVIRONMENT PAM_WRAPPER_SERVICE_DIR=${CMAKE_CURRENT_BINARY_DIR}/etc/pam.d)
|
||||
list(APPEND TORTURE_ENVIRONMENT LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/suppressions/lsan.supp)
|
||||
|
||||
# Give bob some keys
|
||||
file(COPY keys/id_rsa DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/home/bob/.ssh/ FILE_PERMISSIONS OWNER_READ OWNER_WRITE)
|
||||
|
1
tests/suppressions/lsan.supp
Обычный файл
1
tests/suppressions/lsan.supp
Обычный файл
@ -0,0 +1 @@
|
||||
leak:libcrypto.so
|
@ -101,6 +101,10 @@ foreach(_UNIT_TEST ${LIBSSH_UNIT_TESTS})
|
||||
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
|
||||
LINK_LIBRARIES ${TEST_TARGET_LIBRARIES}
|
||||
)
|
||||
|
||||
set_property(TEST ${_UNIT_TEST}
|
||||
PROPERTY
|
||||
ENVIRONMENT LSAN_OPTIONS=suppressions=${libssh-tests_SOURCE_DIR}/suppressions/lsan.supp)
|
||||
endforeach()
|
||||
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
@ -110,6 +114,10 @@ if (CMAKE_USE_PTHREADS_INIT)
|
||||
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
|
||||
LINK_LIBRARIES ${TEST_TARGET_LIBRARIES} Threads::Threads
|
||||
)
|
||||
|
||||
set_property(TEST ${_UNIT_TEST}
|
||||
PROPERTY
|
||||
ENVIRONMENT LSAN_OPTIONS=suppressions=${libssh-tests_SOURCE_DIR}/suppressions/lsan.supp)
|
||||
endforeach()
|
||||
endif ()
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user