]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: testsuite: XML: Don't return -1 nor 0 from top-level
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Wed, 29 Apr 2026 23:04:28 +0000 (20:04 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 8 May 2026 21:55:59 +0000 (18:55 -0300)
This patch changes statements that return -1 or 0 from the top level.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.xml/tdesc-arch.exp
gdb/testsuite/gdb.xml/tdesc-regs.exp
gdb/testsuite/gdb.xml/tdesc-reload.exp

index f3bb9ba26523e19735c6da6c9bcdded20521a437..1f9b3c200571fb0cffb603a02e3da13f8dca48ee 100644 (file)
@@ -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
index 96f0fe089aa5d3656d16378806b5ff50ee6c165a..092355020b2cce681c66fdddb14bc6128088577d 100644 (file)
@@ -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.
index cdd075de099d6817fce2802aac188bc0cdf3f2c9..41dc30a7a5a1f1dec6a9f1c37e478848bd35771b 100644 (file)
@@ -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