Module Name:    src
Committed By:   martin
Date:           Thu Dec 16 16:30:56 UTC 2021

Modified Files:
        src/tests/usr.bin/c++: t_tsan_thread_leak.sh t_tsan_vptr_race.sh

Log Message:
Remove bogus architecture detection voodo - tsan is not available
on most architectures, so just state it that way.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/c++/t_tsan_thread_leak.sh \
    src/tests/usr.bin/c++/t_tsan_vptr_race.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/c++/t_tsan_thread_leak.sh
diff -u src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.4 src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.5
--- src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.4	Tue Nov 17 08:25:57 2020
+++ src/tests/usr.bin/c++/t_tsan_thread_leak.sh	Thu Dec 16 16:30:55 2021
@@ -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
Index: src/tests/usr.bin/c++/t_tsan_vptr_race.sh
diff -u src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.4 src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.5
--- src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.4	Tue Nov 17 08:25:57 2020
+++ src/tests/usr.bin/c++/t_tsan_vptr_race.sh	Thu Dec 16 16:30:55 2021
@@ -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

Reply via email to