bookmarkfs/tests/lib_sandbox.at
CismonX 1836692719
test: disable LSAN for sandbox tests
since they do not play well with seccomp and landlock
2025-03-05 13:36:38 +08:00

30 lines
816 B
Text

dnl
dnl Copyright (C) 2025 CismonX <admin@cismon.net>
dnl
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty,
dnl provided the copyright notice and this notice are preserved.
dnl This file is offered as-is, without any warranty.
dnl
AT_SETUP([util lib: sandbox])
AT_KEYWORDS([lib sandbox])
ATX_CHECK_LIB([
tmpdir=./$(ath_fn_rand_u64_hex).tmp.d
mkdir $tmpdir
printf '%s\n\n%s\n' '#!/bin/sh' 'exit 2' > $tmpdir/false.sh
chmod +x $tmpdir/false.sh
# LSAN does not play well with sandbox...
export ASAN_OPTIONS="$ASAN_OPTIONS:detect_leaks=0"
# Check both read-only and read/write mode.
ATX_RUN([
check-util-lib sandbox -r -d $tmpdir
check-util-lib sandbox -d $tmpdir
])
])
AT_CLEANUP