[binutils-gdb] GDB: testsuite: XML: Don't return -1 nor 0 from top-level

Thiago Bauermann via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bf2e321d3659df891bd385dde74a58c2bc5daa74

commit bf2e321d3659df891bd385dde74a58c2bc5daa74
Author: Thiago Jung Bauermann <[email protected]>
Date:   Wed Apr 29 20:04:28 2026 -0300

    GDB: testsuite: XML: Don't return -1 nor 0 from top-level
    
    This patch changes statements that return -1 or 0 from the top level.
    
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 gdb/testsuite/gdb.xml/tdesc-arch.exp   | 4 ++--
 gdb/testsuite/gdb.xml/tdesc-regs.exp   | 2 +-
 gdb/testsuite/gdb.xml/tdesc-reload.exp | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/tdesc-arch.exp
index f3bb9ba2652..1f9b3c20057 100644
--- a/gdb/testsuite/gdb.xml/tdesc-arch.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-arch.exp
@@ -31,7 +31,7 @@ gdb_test_multiple "set architecture" $msg {
     -re "Requires an argument. Valid arguments are (\[^ \]*), auto\\.\r\n$gdb_prompt $" {
 	# If there is just one supported architecture, we can't do this test.
 	unsupported "tdesc-arch.exp"
-	return -1
+	return
     }
 }
 
@@ -47,7 +47,7 @@ gdb_test_multiple "show architecture" $msg {
 # If that did not work, no point running further tests.
 if { "$arch1" == "" || "$arch2" == "" || "$default_arch" == "" } {
     unresolved "architecture XML tests"
-    return -1
+    return
 }
 
 # Run these tests twice, once for $arch1 and once for $arch2, to
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 96f0fe089aa..092355020b2 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
@@ -109,7 +109,7 @@ if {[string equal ${core-regs} ""]} {
 	unsupported "register tests (missing architecture-specific core-regs setting)"
     }
 
-    return 0
+    return
 }
 
 # Otherwise, we support both XML and target defined registers.
diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp
index cdd075de099..41dc30a7a5a 100644
--- a/gdb/testsuite/gdb.xml/tdesc-reload.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp
@@ -21,11 +21,11 @@ require allow_xml_test
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Three files we're going to write out to.
@@ -60,7 +60,7 @@ gdb_load ${binfile}
 
 # Run to `main' where we begin our tests.
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Run info registers just to check this appears to run fine with the
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.