summaryrefslogtreecommitdiff
path: root/tests/usr.bin/c++
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2021-12-16 16:30:55 +0000
committermartin <martin@NetBSD.org>2021-12-16 16:30:55 +0000
commitd93e7e707df3dafbaf76d541c2d140c21dfbfc9b (patch)
tree8f86e67574cfeead3a80cf641e4e7da7a80f585e /tests/usr.bin/c++
parenteb609a90ab40146246b530bb0c40d609ae288010 (diff)
Remove bogus architecture detection voodo - tsan is not available
on most architectures, so just state it that way.
Diffstat (limited to 'tests/usr.bin/c++')
-rw-r--r--tests/usr.bin/c++/t_tsan_thread_leak.sh23
-rw-r--r--tests/usr.bin/c++/t_tsan_vptr_race.sh24
2 files changed, 11 insertions, 36 deletions
diff --git a/tests/usr.bin/c++/t_tsan_thread_leak.sh b/tests/usr.bin/c++/t_tsan_thread_leak.sh
index 7b9ad15dd71..b9010f4ee04 100644
--- a/tests/usr.bin/c++/t_tsan_thread_leak.sh
+++ b/tests/usr.bin/c++/t_tsan_thread_leak.sh
@@ -28,41 +28,33 @@
test_target()
{
- 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" "c++ paxctl"
+ test_target
}
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" "c++ paxctl"
+ test_target
}
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" "c++ paxctl"
+ test_target
}
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" "c++ paxctl"
+ test_target
}
thread_leak_body(){
@@ -202,11 +194,6 @@ target_not_supported_body()
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
diff --git a/tests/usr.bin/c++/t_tsan_vptr_race.sh b/tests/usr.bin/c++/t_tsan_vptr_race.sh
index 38a7dd5f16c..ae7bbd092e6 100644
--- a/tests/usr.bin/c++/t_tsan_vptr_race.sh
+++ b/tests/usr.bin/c++/t_tsan_vptr_race.sh
@@ -26,43 +26,36 @@
# POSSIBILITY OF SUCH DAMAGE.
#
+
test_target()
{
- 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 vptr_race
vptr_race_head() {
atf_set "descr" "Test thread sanitizer for vptr race condition"
atf_set "require.progs" "c++ paxctl"
+ test_target
}
atf_test_case vptr_race_profile
vptr_race_profile_head() {
atf_set "descr" "Test thread sanitizer for vptr race with profiling option"
atf_set "require.progs" "c++ paxctl"
+ test_target
}
atf_test_case vptr_race_pic
vptr_race_pic_head() {
atf_set "descr" "Test thread sanitizer for vptr race with position independent code (PIC) flag"
atf_set "require.progs" "c++ paxctl"
+ test_target
}
atf_test_case vptr_race_pie
vptr_race_pie_head() {
atf_set "descr" "Test thread sanitizer for vptr race with position independent execution (PIE) flag"
atf_set "require.progs" "c++ paxctl"
+ test_target
}
vptr_race_body(){
@@ -226,11 +219,6 @@ target_not_supported_body()
atf_init_test_cases()
{
- test_target
- test $SUPPORT = 'n' && {
- atf_add_test_case target_not_supported
- return 0
- }
atf_add_test_case vptr_race
atf_add_test_case vptr_race_profile
atf_add_test_case vptr_race_pie