This changes some tests to use "require !skip_hw_watchpoint_tests".
require !skip_ada_tests
-if { [skip_hw_watchpoint_tests] } { return -1 }
+require !skip_hw_watchpoint_tests
standard_ada_testfile foo
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
standard_testfile .c
# followed by a catchpoint hit.
# This test uses "awatch".
-if {[skip_hw_watchpoint_access_tests]} {
- return
-}
+require !skip_hw_watchpoint_access_tests
standard_testfile
standard_testfile .c
-if {[skip_hw_watchpoint_access_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_access_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
# so the test is only meaningful on a system with hardware watchpoints.
# More specifically, the implementation of this test uses access
# watchpoints, so skip it when those are not available.
-if {[skip_hw_watchpoint_access_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_access_tests
standard_testfile .c
# watchpoint-hw-attach.exp -- Test if hardware watchpoints are used
# when attaching to a target.
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
if {![can_spawn_for_attach]} {
return 0
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_hw_watchpoint_access_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_access_tests
set test watchpoint-hw-hit-once
set srcfile ${test}.c
return
}
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
standard_testfile
standard_testfile
# No use testing this if we can't use hardware watchpoints.
-if {[skip_hw_watchpoint_tests]} {
- return -1
-}
+require !skip_hw_watchpoint_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
# Test inserting read watchpoints on unaligned addresses.
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
standard_testfile
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if [skip_hw_watchpoint_tests] {
- return -1
-}
+require !skip_hw_watchpoint_tests
if { ![support_displaced_stepping] } {
unsupported "displaced stepping"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
load_lib mi-support.exp
set MIFLAGS "-i=mi"
# Do not use simple hardware watchpoints ("watch") as its false hit may be
# unnoticed by GDB if it reads it still has the same value.
-if [skip_hw_watchpoint_access_tests] {
- untested "${testfile} (no hardware access watchpoints)"
- return
-}
+require !skip_hw_watchpoint_access_tests
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
# thread other than the thread the local watchpoint was set in stops
# for a breakpoint.
-if {[skip_hw_watchpoint_multi_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_multi_tests
standard_testfile
if {[gdb_compile_pthreads \
# This test verifies that a watchpoint is detected in a multithreaded
# program so the test is only meaningful on a system with hardware
# watchpoints.
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
# could be assigned during continuation of a thread with pending SIGTRAP to the
# different/new watchpoint, just based on the watchpoint/debug register number.
-if {[skip_hw_watchpoint_access_tests]
- || [skip_hw_watchpoint_multi_tests]
- || ![istarget *-*-linux*]} {
+require !skip_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
+if {![istarget *-*-linux*]} {
return 0
}
# This test verifies that a watchpoint is detected in the proper thread
# so the test is only meaningful on a system with hardware watchpoints.
-if {[skip_hw_watchpoint_multi_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_multi_tests
proc target_no_stopped_data { } {
return [istarget s390*-*-*]
# This test verifies that a watchpoint is detected in the proper thread
# so the test is only meaningful on a system with hardware watchpoints.
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
# This test verifies that a hardware watchpoint gets replicated to
# every existing thread and is detected properly. This test is
# only meaningful on a target with hardware watchpoint support.
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } {