mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Enable code coverage also for client testing
This adds the priv_wrapper options to skip the OpenSSH server sandbox, which prevented in the past writing any debug information or coverage files causing SIGSYS/crashes. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -126,13 +126,11 @@ fedora/ninja:
|
||||
script:
|
||||
- cmake -G Ninja $CMAKE_OPTIONS ../ && ninja && ninja test
|
||||
|
||||
# Code coverage instrumentation breaks OpenSSH server so we are skipping client
|
||||
# testing part here as well as benchmarks (which turn on the client tests)
|
||||
fedora/coverage:
|
||||
extends: .fedora
|
||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
||||
variables:
|
||||
CMAKE_ADDITIONAL_OPTIONS: -DCMAKE_BUILD_TYPE=Coverage -DCLIENT_TESTING=OFF -DWITH_BENCHMARKS=OFF
|
||||
CMAKE_ADDITIONAL_OPTIONS: -DCMAKE_BUILD_TYPE=Coverage
|
||||
script:
|
||||
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
||||
make -j$(nproc) &&
|
||||
|
||||
@@ -248,6 +248,7 @@ if (CLIENT_TESTING OR SERVER_TESTING)
|
||||
set(TORTURE_ENVIRONMENT "LD_PRELOAD=${SOCKET_WRAPPER_LIBRARY}:${NSS_WRAPPER_LIBRARY}:${UID_WRAPPER_LIBRARY}:${PAM_WRAPPER_LIBRARY}:${CHROOT_WRAPPER}")
|
||||
if (priv_wrapper_FOUND)
|
||||
list(APPEND TORTURE_ENVIRONMENT PRIV_WRAPPER=1 PRIV_WRAPPER_CHROOT_DISABLE=1)
|
||||
list(APPEND TORTURE_ENVIRONMENT PRIV_WRAPPER_PRCTL_DISABLE="ALL" PRIV_WRAPPER_SETRLIMIT_DISABLE="ALL")
|
||||
endif()
|
||||
list(APPEND TORTURE_ENVIRONMENT UID_WRAPPER=1 UID_WRAPPER_ROOT=1)
|
||||
list(APPEND TORTURE_ENVIRONMENT NSS_WRAPPER_PASSWD=${CMAKE_CURRENT_BINARY_DIR}/etc/passwd)
|
||||
|
||||
Reference in New Issue
Block a user