This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Skip setting HW watchpoint if skip_hw_watchpoint_multi_tests in gdb.base/break-idempotent.exp


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5fccc63539a111f4087522316819cc8a4b28c6b0

commit 5fccc63539a111f4087522316819cc8a4b28c6b0
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Apr 30 10:08:10 2015 +0100

    Skip setting HW watchpoint if skip_hw_watchpoint_multi_tests in gdb.base/break-idempotent.exp
    
    Hi,
    I see this fails below on arm linux native testing and remote testing
    with "set remote hardware-watchpoint-limit 1",
    
     rwatch global^M
     There are not enough available hardware resources for this watchpoint.^M
     (gdb) FAIL: gdb.base/break-idempotent.exp: always-inserted off: rwatch: twice: rwatch global
    
    gdb.base/break-idempotent.exp sets two breakpoints/watchpoints on the
    same address.  GDB isn't smart enough calculate these two HW
    watchpoints can fit in one HW debug register, so the error message
    above isn't necessary (there is one HW watchpoint register on arm).
    Because target_ops interface can_use_hardware_watchpoint doesn't
    pass enough information to the target backend.
    
    Note that if I don't "set remote hardware-watchpoint-limit 1" in
    remote testing, this test passes without fails.  However without
    "set remote hardware-watchpoint-limit 1", many other watchpoint
    tests fail.
    
    This patch is to add a check to skip_hw_watchpoint_multi_tests
    for rwatch and awatch.  We can add such check for watch as well,
    but GDB is able to switch to software watchpoint if HW resource
    isn't available, it doesn't cause any fail, I decide not to skip.
    
    gdb/testsuite:
    
    2015-04-30  Yao Qi  <yao.qi@linaro.org>
    
    	* gdb.base/break-idempotent.exp: If
    	skip_hw_watchpoint_multi_tests returns true, skip the tests
    	on "rwatch" and "awatch".

Diff:
---
 gdb/testsuite/ChangeLog                     | 6 ++++++
 gdb/testsuite/gdb.base/break-idempotent.exp | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1e48f98..e68ffaf 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
 2015-04-30  Yao Qi  <yao.qi@linaro.org>
 
+	* gdb.base/break-idempotent.exp: If
+	skip_hw_watchpoint_multi_tests returns true, skip the tests
+	on "rwatch" and "awatch".
+
+2015-04-30  Yao Qi  <yao.qi@linaro.org>
+
 	* gdb.base/relativedebug.exp: Invoke gdb command
 	"info sharedlibrary", and if libc.so doesn't have debug info,
 	skip the test.
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index c5dae96..1cff706 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -174,7 +174,8 @@ foreach always_inserted { "off" "on" } {
 	test_break $always_inserted "watch"
     }
 
-    if {![skip_hw_watchpoint_access_tests]} {
+    if {![skip_hw_watchpoint_access_tests]
+	&& ![skip_hw_watchpoint_multi_tests]} {
 	test_break $always_inserted "rwatch"
 	test_break $always_inserted "awatch"
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]