mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
tests: keep SYS_PTRACE when running under ASan
This commit is contained in:
parent
3306711ffb
commit
7a30256588
@ -20,8 +20,13 @@
|
||||
static uid_t test_uid = -1;
|
||||
static gid_t test_gid = -1;
|
||||
|
||||
#ifdef __SANITIZE_ADDRESS__
|
||||
/* Keep CAP_SYS_PTRACE when running under Address Sanitizer */
|
||||
static const uint64_t test_flags = UINT64_C(1) << CAP_SYS_PTRACE;
|
||||
#else
|
||||
/* We keep CAP_DAC_OVERRIDE to avoid errors with gcov when doing test coverage */
|
||||
static uint64_t test_flags = 1ULL << CAP_DAC_OVERRIDE;
|
||||
static const uint64_t test_flags = UINT64_C(1) << CAP_DAC_OVERRIDE;
|
||||
#endif
|
||||
|
||||
/* verify cap_last_cap() against /proc/sys/kernel/cap_last_cap */
|
||||
static void test_last_cap_file(void) {
|
||||
|
@ -53,7 +53,6 @@ for phase in "${PHASES[@]}"; do
|
||||
$DOCKER_EXEC git clean -dxff
|
||||
$DOCKER_EXEC meson -Db_sanitize=address,undefined build
|
||||
$DOCKER_EXEC ninja -v -C build
|
||||
$DOCKER_EXEC sh -c "printf '#!/bin/sh\necho The test is failing under ASan, skipping; exit 77' >/build/build/test-capability"
|
||||
|
||||
# Never remove halt_on_error from UBSAN_OPTIONS. See https://github.com/systemd/systemd/commit/2614d83aa06592aedb.
|
||||
$DOCKER_EXEC sh -c "UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 meson test --timeout-multiplier=3 -C ./build/ --print-errorlogs"
|
||||
|
Loading…
Reference in New Issue
Block a user