Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 20/37] GDB: testsuite: GDB: Don't return -1 from top-level
Date: Wed, 29 Apr 2026 20:04:11 -0300	[thread overview]
Message-ID: <20260429230432.60487-21-thiago.bauermann@linaro.org> (raw)
In-Reply-To: <20260429230432.60487-1-thiago.bauermann@linaro.org>

All changes except for one are the result of running:

$ sed -i 's/^    return -1/    return/' *.exp

inside gdb/testsuite/gdb.gdb.  The exception is a return statement in
index-file.exp, which is inside a with_timeout_factor block.
---
 gdb/testsuite/gdb.gdb/index-file.exp    | 8 ++++----
 gdb/testsuite/gdb.gdb/python-helper.exp | 2 +-
 gdb/testsuite/gdb.gdb/unittest.exp      | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.gdb/index-file.exp b/gdb/testsuite/gdb.gdb/index-file.exp
index 162ba28bfde1..d0c845302fc2 100644
--- a/gdb/testsuite/gdb.gdb/index-file.exp
+++ b/gdb/testsuite/gdb.gdb/index-file.exp
@@ -25,18 +25,18 @@ require !readnow
 set timeout_factor 20
 
 set filename [selftest_prepare]
 if { $filename eq "" } {
     unsupported "${gdb_test_file_name}.exp"
-    return -1
+    return
 }
 
 # If FILENAME is a libtool wrapper, then we need to get the path of the real
 # executable.
 set filename [selftest_libtool_get_real_gdb_executable $filename]
 if { $filename eq "" } {
-    return -1
+    return
 }
 
 with_timeout_factor $timeout_factor {
     # Start GDB, load FILENAME.
     clean_restart
@@ -46,11 +46,11 @@ with_timeout_factor $timeout_factor {
 # Record how many worker threads GDB is using.
 set worker_threads [gdb_get_worker_threads]
 
 if { $worker_threads eq "UNKNOWN" } {
     unresolved "unable to get worker thread count"
-    return -1
+    return
 }
 
 # Generate an index file.
 set dir1 [standard_output_file "index_1"]
 remote_exec host "mkdir -p ${dir1}"
@@ -64,11 +64,11 @@ with_timeout_factor $timeout_factor {
 	    pass $gdb_test_name
 	    set ok 1
 	}
     }
     if { ! $ok } {
-	return -1
+	return
     }
 
     gdb_test_no_output "save gdb-index -dwarf-5 $dir1" \
 	"create dwarf-index files"
 }
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
index b39f51de44fe..8f00ce920af3 100644
--- a/gdb/testsuite/gdb.gdb/python-helper.exp
+++ b/gdb/testsuite/gdb.gdb/python-helper.exp
@@ -24,11 +24,11 @@ require {!target_info exists gdb,noinferiorio}
 require allow_python_tests
 
 standard_testfile .cc
 
 if { [build_executable "failed to build" $testfile $srcfile {debug c++}] } {
-    return -1
+    return
 }
 
 # Find the helper script in the GDB build directory.
 set py_helper_script [file dirname $GDB]/gdb-gdb.py
 if { ![file readable $py_helper_script] \
diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/unittest.exp
index 29e4206cb309..26870a7a0b7a 100644
--- a/gdb/testsuite/gdb.gdb/unittest.exp
+++ b/gdb/testsuite/gdb.gdb/unittest.exp
@@ -22,11 +22,11 @@ load_lib completion-support.exp
 set do_xml_test [allow_xml_test]
 
 standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
-    return -1
+    return
 }
 
 proc run_selftests_1 {} {
     global decimal gdb_prompt
 

  parent reply	other threads:[~2026-04-29 23:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 23:03 [PATCH v2 00/37] GDB: testsuite: Fix top-level returns Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 01/37] GDB: testsuite: aarch64, arm: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 02/37] GDB: testsuite: aarch64, arm: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 03/37] GDB: testsuite: x86, amd64, i386, ia64: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 04/37] GDB: testsuite: x86, amd64, i386: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 05/37] GDB: testsuite: powerpc: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 06/37] GDB: testsuite: powerpc: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 07/37] GDB: testsuite: riscv: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:03 ` [PATCH v2 08/37] GDB: testsuite: riscv: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 09/37] GDB: testsuite: s390: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 10/37] GDB: testsuite: sparc: " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 11/37] GDB: testsuite: Don't return value from top-level in tests of various arches Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 12/37] GDB: testsuite: Don't return value from top-level in multi-arch tests Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 13/37] GDB: testsuite: base: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 14/37] GDB: testsuite: base: Don't return 0 " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 15/37] GDB: testsuite: base: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-05-08 22:01   ` Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 16/37] GDB: testsuite: C++: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 17/37] GDB: testsuite: C++: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 18/37] GDB: testsuite: DWARF: Don't return value from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 19/37] GDB: testsuite: DWARF: Don't return -1 from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` Thiago Jung Bauermann [this message]
2026-04-29 23:04 ` [PATCH v2 21/37] GDB: testsuite: Guile: Don't return -1 from top-level Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 22/37] GDB: testsuite: Python: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 23/37] GDB: testsuite: Python: Don't return 0 " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 24/37] GDB: testsuite: Python: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 25/37] GDB: testsuite: linespec: Don't return value from top-level Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 26/37] GDB: testsuite: MI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 27/37] GDB: testsuite: MI: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 28/37] GDB: testsuite: reverse: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 29/37] GDB: testsuite: reverse: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 30/37] GDB: testsuite: server: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 31/37] GDB: testsuite: server: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 32/37] GDB: testsuite: threads: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 33/37] GDB: testsuite: threads: Don't return 0 " Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 34/37] GDB: testsuite: threads: Don't return value from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 35/37] GDB: testsuite: TUI: Don't return -1 from top-level (sed) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 36/37] GDB: testsuite: TUI: Don't return 0 from top-level (manual) Thiago Jung Bauermann
2026-04-29 23:04 ` [PATCH v2 37/37] GDB: testsuite: XML: Don't return -1 nor 0 from top-level Thiago Jung Bauermann
2026-05-08 17:47 ` [PATCH v2 00/37] GDB: testsuite: Fix top-level returns Tom Tromey
2026-05-08 22:06   ` Thiago Jung Bauermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260429230432.60487-21-thiago.bauermann@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox