[binutils-gdb] [gdb/testsuite] Fix gdb.base/reset-catchpoint-cond.exp with --with-expat=no

Tom de Vries vries@sourceware.org
Tue Dec 3 15:52:07 GMT 2024


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

commit d556cf2ec79ed5afbbdd523484954c6a520b5b73
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Dec 3 16:53:14 2024 +0100

    [gdb/testsuite] Fix gdb.base/reset-catchpoint-cond.exp with --with-expat=no
    
    When building gdb with --with-expat=no and running test-case
    gdb.base/reset-catchpoint-cond.exp we get:
    ...
    (gdb) catch syscall write^M
    warning: Can not parse XML syscalls information; \
      XML support was disabled at compile time.^M
    Unknown syscall name 'write'.^M
    (gdb) FAIL: $exp: mode=syscall: catch syscall write
    ...
    
    Fix this by skipping the test for --with-expat=no.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.base/reset-catchpoint-cond.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/testsuite/gdb.base/reset-catchpoint-cond.exp b/gdb/testsuite/gdb.base/reset-catchpoint-cond.exp
index e119c32e702..dabacd47467 100644
--- a/gdb/testsuite/gdb.base/reset-catchpoint-cond.exp
+++ b/gdb/testsuite/gdb.base/reset-catchpoint-cond.exp
@@ -165,5 +165,8 @@ proc run_test { mode } {
 
 # Run the tests.
 foreach_with_prefix mode { syscall signal fork } {
+    if { $mode == "syscall" && ![allow_xml_test] } {
+	continue
+    }
     run_test $mode
 }


More information about the Gdb-cvs mailing list