Simplify test requirements: we only build tsan for amd64 currently.
This commit is contained in:
parent
6e63e64722
commit
af1644547e
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case data_race
|
||||
data_race_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race condition"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case data_race_profile
|
||||
data_race_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race with profiling option"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case data_race_pic
|
||||
data_race_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case data_race_pie
|
||||
data_race_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
data_race_body(){
|
||||
|
@ -163,25 +155,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race " ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case data_race
|
||||
atf_add_test_case data_race_profile
|
||||
atf_add_test_case data_race_pie
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
tsan_available_archs()
|
||||
{
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
test_target()
|
||||
{
|
||||
SUPPORT='n'
|
||||
|
@ -47,22 +52,26 @@ atf_test_case heap_use_after_free
|
|||
heap_use_after_free_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free condition"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case heap_use_after_free_profile
|
||||
heap_use_after_free_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free with profiling option"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case heap_use_after_free_pic
|
||||
heap_use_after_free_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case heap_use_after_free_pie
|
||||
heap_use_after_free_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
heap_use_after_free_body(){
|
||||
|
@ -200,24 +209,8 @@ EOF
|
|||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case heap_use_after_free
|
||||
atf_add_test_case heap_use_after_free_profile
|
||||
atf_add_test_case heap_use_after_free_pie
|
||||
|
|
|
@ -26,43 +26,36 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case lock_order_inversion
|
||||
lock_order_inversion_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion condition"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case lock_order_inversion_profile
|
||||
lock_order_inversion_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion with profiling option"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case lock_order_inversion_pic
|
||||
lock_order_inversion_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case lock_order_inversion_pie
|
||||
lock_order_inversion_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
lock_order_inversion_body(){
|
||||
|
@ -183,25 +176,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: lock-order-inversion" ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case lock_order_inversion
|
||||
atf_add_test_case lock_order_inversion_profile
|
||||
atf_add_test_case lock_order_inversion_pie
|
||||
|
|
|
@ -26,43 +26,36 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case locked_mutex_destroy
|
||||
locked_mutex_destroy_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex condition"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case locked_mutex_destroy_profile
|
||||
locked_mutex_destroy_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex with profiling option"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case locked_mutex_destroy_pic
|
||||
locked_mutex_destroy_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case locked_mutex_destroy_pie
|
||||
locked_mutex_destroy_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
locked_mutex_destroy_body(){
|
||||
|
@ -200,24 +193,8 @@ EOF
|
|||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case locked_mutex_destroy
|
||||
atf_add_test_case locked_mutex_destroy_profile
|
||||
atf_add_test_case locked_mutex_destroy_pie
|
||||
|
|
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case signal_errno
|
||||
signal_errno_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal condition"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case signal_errno_profile
|
||||
signal_errno_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal with profiling option"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case signal_errno_pic
|
||||
signal_errno_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case signal_errno_pie
|
||||
signal_errno_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "c++ paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
signal_errno_body(){
|
||||
|
@ -187,25 +179,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: signal handler spoils errno" ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case signal_errno
|
||||
atf_add_test_case signal_errno_profile
|
||||
atf_add_test_case signal_errno_pie
|
||||
|
|
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case data_race
|
||||
data_race_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race condition"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case data_race_profile
|
||||
data_race_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race with profiling option"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case data_race_pic
|
||||
data_race_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case data_race_pie
|
||||
data_race_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for data race with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
data_race_body(){
|
||||
|
@ -163,25 +155,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race " ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case data_race
|
||||
atf_add_test_case data_race_profile
|
||||
atf_add_test_case data_race_pie
|
||||
|
|
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case heap_use_after_free
|
||||
heap_use_after_free_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free condition"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case heap_use_after_free_profile
|
||||
heap_use_after_free_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free with profiling option"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case heap_use_after_free_pic
|
||||
heap_use_after_free_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case heap_use_after_free_pie
|
||||
heap_use_after_free_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for use-after-free with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
heap_use_after_free_body(){
|
||||
|
@ -199,25 +191,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: heap-use-after-free" ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case heap_use_after_free
|
||||
atf_add_test_case heap_use_after_free_profile
|
||||
atf_add_test_case heap_use_after_free_pie
|
||||
|
|
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case lock_order_inversion
|
||||
lock_order_inversion_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion condition"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case lock_order_inversion_profile
|
||||
lock_order_inversion_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion with profiling option"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case lock_order_inversion_pic
|
||||
lock_order_inversion_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case lock_order_inversion_pie
|
||||
lock_order_inversion_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for lock order inversion with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
lock_order_inversion_body(){
|
||||
|
@ -183,25 +175,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: lock-order-inversion" ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case lock_order_inversion
|
||||
atf_add_test_case lock_order_inversion_profile
|
||||
atf_add_test_case lock_order_inversion_pie
|
||||
|
|
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case locked_mutex_destroy
|
||||
locked_mutex_destroy_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex condition"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case locked_mutex_destroy_profile
|
||||
locked_mutex_destroy_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex with profiling option"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case locked_mutex_destroy_pic
|
||||
locked_mutex_destroy_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case locked_mutex_destroy_pie
|
||||
locked_mutex_destroy_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for destroying locked mutex with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
locked_mutex_destroy_body(){
|
||||
|
@ -199,25 +191,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: destroy of a locked mutex" ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case locked_mutex_destroy
|
||||
atf_add_test_case locked_mutex_destroy_profile
|
||||
atf_add_test_case locked_mutex_destroy_pie
|
||||
|
|
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case signal_errno
|
||||
signal_errno_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal condition"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case signal_errno_profile
|
||||
signal_errno_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal with profiling option"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case signal_errno_pic
|
||||
signal_errno_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case signal_errno_pie
|
||||
signal_errno_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for errno modification in signal with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
signal_errno_body(){
|
||||
|
@ -187,25 +179,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: signal handler spoils errno" ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case signal_errno
|
||||
atf_add_test_case signal_errno_profile
|
||||
atf_add_test_case signal_errno_pie
|
||||
|
|
|
@ -26,43 +26,35 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
test_target()
|
||||
tsan_available_archs()
|
||||
{
|
||||
SUPPORT='n'
|
||||
# Detect address space larger than 32 bits
|
||||
maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
|
||||
if [ $maxaddress -gt 4294967295 ]; then
|
||||
if command -v cc >/dev/null 2>&1; then
|
||||
if ! echo __clang__ | cc -E - | grep -q __clang__; then
|
||||
SUPPORT='y'
|
||||
elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
|
||||
awk -F '.' '($0+0) > 9 {exit 1}'; then
|
||||
SUPPORT='y'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
atf_set "require.arch" "x86_64"
|
||||
}
|
||||
|
||||
atf_test_case thread_leak
|
||||
thread_leak_head() {
|
||||
atf_set "descr" "Test thread sanitizer for thread leak condition"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
atf_test_case thread_leak_profile
|
||||
thread_leak_profile_head() {
|
||||
atf_set "descr" "Test thread sanitizer for thread leak with profiling option"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case thread_leak_pic
|
||||
thread_leak_pic_head() {
|
||||
atf_set "descr" "Test thread sanitizer for thread leak with position independent code (PIC) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
atf_test_case thread_leak_pie
|
||||
thread_leak_pie_head() {
|
||||
atf_set "descr" "Test thread sanitizer for thread leak with position independent execution (PIE) flag"
|
||||
atf_set "require.progs" "cc paxctl"
|
||||
tsan_available_archs
|
||||
}
|
||||
|
||||
thread_leak_body(){
|
||||
|
@ -187,25 +179,8 @@ EOF
|
|||
atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: thread leak" ./test
|
||||
}
|
||||
|
||||
|
||||
atf_test_case target_not_supported
|
||||
target_not_supported_head()
|
||||
{
|
||||
atf_set "descr" "Test forced skip"
|
||||
}
|
||||
|
||||
target_not_supported_body()
|
||||
{
|
||||
atf_skip "Target is not supported"
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
test_target
|
||||
test $SUPPORT = 'n' && {
|
||||
atf_add_test_case target_not_supported
|
||||
return 0
|
||||
}
|
||||
atf_add_test_case thread_leak
|
||||
atf_add_test_case thread_leak_profile
|
||||
atf_add_test_case thread_leak_pie
|
||||
|
|
Loading…
Reference in New Issue