Add new configure option, --enable-race-checking

This commit adds a new configure option, --enable-race-checking
which is to be used exclusively for debugging. Also, conditionally
add tests to XFAIL_TESTS when Race Checking is enabled.
This commit is contained in:
Darshit Shah 2013-12-04 07:50:17 +05:30 committed by Giuseppe Scrivano
parent fa670282ee
commit 59a03f15dd
4 changed files with 49 additions and 22 deletions

View File

@ -1,7 +1,8 @@
2013-10-23 Darshit Shah <darnir@gmail.com>
* configure.ac: Remove redundant --enable-threads option.
Add Metalink to configure summary
* configure.ac: Add --race-detection.
* configure.ac: Remove redundant --enable-threads option.
Add Metalink to configure summary
2013-07-02 Darshit Shah <darnir@gmail.com>

View File

@ -96,6 +96,12 @@ ENABLE_METALINK=$enableval, ENABLE_METALINK=no)
test x"${ENABLE_METALINK}" = xyes && AC_DEFINE([ENABLE_METALINK], 1,
[Define if you want the metalink file format support compiled in.])
AC_ARG_ENABLE(race-detection,
[ --enable-race-detection enable support for detecting race conditions],
ENABLE_RACES=$enableval, ENABLE_RACES=no)
test x"${ENABLE_RACES}" = xyes && AC_DEFINE([ENABLE_RACES], 1,
[Define if you want runtime Race Detection enabled.])
dnl
dnl Find the compiler
dnl
@ -388,6 +394,11 @@ dnl ])
])
])
AS_IF([test x"$ENABLE_RACES" != xno],[
CFLAGS="$CFLAGS -fsanitize=thread -fPIE";
LDFLAGS="$LDFLAGS -fsanitize=thread -pie";
])
AS_IF([test x"$ENABLE_METALINK" != xno],[
dnl If metalink support is requested
PKG_CHECK_MODULES(LIBMETALINK, libmetalink, [
@ -630,6 +641,7 @@ dnl Needed by src/Makefile.am
AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" == "Xyes"])
AM_CONDITIONAL([METALINK_IS_ENABLED], [test "X$metalink" == "Xyes"])
AM_CONDITIONAL([THREADS_ARE_ENABLED], [test "X$threads" == "Xyes"])
AM_CONDITIONAL([RACE_CHECKING_IS_ENABLED], [test "X$race-detection" == "Xyes"])
dnl
dnl Create output
@ -656,4 +668,5 @@ AC_MSG_NOTICE([Summary of build options:
OPIE: $ENABLE_OPIE
Metalink: $ENABLE_METALINK
Debugging: $ENABLE_DEBUG
Race Detection: $ENABLE_RACES
])

View File

@ -1,3 +1,8 @@
2013-12-04 Darshit Shah <darnir@gmail.com>
* Makefile.am [RACE_CHECKING_IS_ENABLED]: Define `RACE_FAIL' and
RACE_TESTS'.
2013-10-14 Giuseppe Scrivano <gscrivan@redhat.com>
* Makefile.am (XFAIL_TESTS): Remove Test--spider-r.py.

View File

@ -28,27 +28,35 @@
AUTOMAKE_OPTIONS = parallel-tests
AM_TESTS_ENVIRONMENT = MAKE_CHECK=True; export MAKE_CHECK;
TESTS = Test-auth-basic-fail.py \
Test-auth-basic.py \
Test-auth-both.py \
Test-auth-digest.py \
Test-auth-no-challenge.py \
Test-auth-no-challenge-url.py \
Test-auth-retcode.py \
Test-auth-with-content-disposition.py \
Test-c-full.py \
Test-Content-disposition-2.py \
Test-Content-disposition.py \
Test-cookie-401.py \
Test-cookie-domain-mismatch.py \
Test-cookie-expires.py \
Test-cookie.py \
Test-Head.py \
Test-O.py \
Test-Post.py \
Test--spider-r.py
XFAIL_TESTS = Test-auth-both.py
if RACE_CHECKING_IS_ENABLED
RACE_FAIL = Test--spider-r.py
RACE_TESTS =
endif
TESTS = Test-auth-basic-fail.py \
Test-auth-basic.py \
Test-auth-both.py \
Test-auth-digest.py \
Test-auth-no-challenge.py \
Test-auth-no-challenge-url.py \
Test-auth-retcode.py \
Test-auth-with-content-disposition.py \
Test-c-full.py \
Test-Content-disposition-2.py \
Test-Content-disposition.py \
Test-cookie-401.py \
Test-cookie-domain-mismatch.py \
Test-cookie-expires.py \
Test-cookie.py \
$(RACE_TESTS) \
Test-Head.py \
Test-O.py \
Test-Post.py \
Test--spider-r.py
XFAIL_TESTS = Test-auth-both.py \
$(RACE_FAIL)
LOG_COMPILER = python3