mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Add support for sanitizers
This commit is contained in:
parent
cbfa908d31
commit
57a1df44a4
3 changed files with 32 additions and 12 deletions
|
|
@ -258,7 +258,7 @@ AC_ARG_ENABLE([sgcheck],
|
|||
AC_ARG_ENABLE([helgrind],
|
||||
[AS_HELP_STRING([--enable-helgrind],[enable the use of helgrind in testing])],
|
||||
[
|
||||
TESTENV="$VALGRIND --tool=helgrind --fair-sched=try --suppressions=valgrind.supp --error-exitcode=1"
|
||||
TESTENV="$VALGRIND --tool=helgrind --fair-sched=try --error-exitcode=1"
|
||||
FAILENV="$TESTENV"
|
||||
CFLAGS="$CFLAGS -DCHECKER"
|
||||
THREAD_CHECKER=1
|
||||
|
|
@ -268,7 +268,7 @@ AC_ARG_ENABLE([helgrind],
|
|||
AC_ARG_ENABLE([drd],
|
||||
[AS_HELP_STRING([--enable-drd],[enable the use of drd in testing])],
|
||||
[
|
||||
TESTENV="$VALGRIND --tool=drd --fair-sched=try --suppressions=valgrind.supp --error-exitcode=1"
|
||||
TESTENV="$VALGRIND --tool=drd --fair-sched=try --error-exitcode=1"
|
||||
FAILENV="$TESTENV"
|
||||
CFLAGS="$CFLAGS -DCHECKER"
|
||||
THREAD_CHECKER=1
|
||||
|
|
|
|||
20
makesan.sh
20
makesan.sh
|
|
@ -13,10 +13,18 @@ COMPILER=clang
|
|||
# External libraries are not supported by the Sanitizers
|
||||
OPTIONS="--disable-asm --without-blkid"
|
||||
|
||||
# Source directory
|
||||
SOURCE=`pwd`
|
||||
|
||||
# Dest directory
|
||||
DEST=`mktemp -d`
|
||||
|
||||
make distclean
|
||||
|
||||
cd $DEST
|
||||
|
||||
# AddressSanitizer
|
||||
if ! ./configure --enable-asan $OPTIONS CC=$COMPILER; then
|
||||
if ! $SOURCE/configure --enable-asan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -25,7 +33,7 @@ if ! make check distclean; then
|
|||
fi
|
||||
|
||||
# UndefinedBehaviourSanitizer
|
||||
if ! ./configure --enable-ubsan $OPTIONS CC=$COMPILER; then
|
||||
if ! $SOURCE/configure --enable-ubsan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -34,7 +42,7 @@ if ! make check distclean; then
|
|||
fi
|
||||
|
||||
# MemorySanitizer
|
||||
if ! ./configure --enable-msan $OPTIONS CC=$COMPILER; then
|
||||
if ! $SOURCE/configure --enable-msan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -43,7 +51,7 @@ if ! make check distclean; then
|
|||
fi
|
||||
|
||||
# ThreadSanitizer
|
||||
if ! ./configure --enable-tsan $OPTIONS CC=$COMPILER; then
|
||||
if ! $SOURCE/configure --enable-tsan $OPTIONS CC=$COMPILER; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -51,7 +59,9 @@ if ! make check distclean; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! ./configure ; then
|
||||
cd $SOURCE
|
||||
|
||||
if ! ./configure; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
20
maketest.sh
20
maketest.sh
|
|
@ -3,10 +3,18 @@
|
|||
# Run all the Coverage and Valgrind tests
|
||||
#
|
||||
|
||||
# Source directory
|
||||
SOURCE=`pwd`
|
||||
|
||||
# Dest directory
|
||||
DEST=`mktemp -d`
|
||||
|
||||
make distclean
|
||||
|
||||
cd $DEST
|
||||
|
||||
# Coverage
|
||||
if ! ./configure --enable-coverage --enable-sde; then
|
||||
if ! $SOURCE/configure --enable-coverage --enable-sde; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -19,7 +27,7 @@ if ! make distclean; then
|
|||
fi
|
||||
|
||||
# Valgrind
|
||||
if ! ./configure --enable-valgrind; then
|
||||
if ! $SOURCE/configure --enable-valgrind; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -28,7 +36,7 @@ if ! make check distclean; then
|
|||
fi
|
||||
|
||||
# Helgrind
|
||||
if ! ./configure --enable-helgrind; then
|
||||
if ! $SOURCE/configure --enable-helgrind; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -37,7 +45,7 @@ if ! make check distclean; then
|
|||
fi
|
||||
|
||||
# Drd
|
||||
if ! ./configure --enable-drd; then
|
||||
if ! $SOURCE/configure --enable-drd; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -45,7 +53,9 @@ if ! make check distclean; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! ./configure ; then
|
||||
cd $SOURCE
|
||||
|
||||
if ! ./configure; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue