[binutils-gdb] GDB: testsuite: GDB: Don't return -1 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=9af00bbb10579f44d3982b132a10744c776c23ad commit 9af00bbb10579f44d3982b132a10744c776c23ad Author: Thiago Jung Bauermann <[email protected]> Date: Wed Apr 29 20:04:11 2026 -0300 GDB: testsuite: GDB: Don't return -1 from top-level 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. Approved-By: Tom Tromey <[email protected]> Diff: --- 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 162ba28bfde..d0c845302fc 100644 --- a/gdb/testsuite/gdb.gdb/index-file.exp +++ b/gdb/testsuite/gdb.gdb/index-file.exp @@ -27,14 +27,14 @@ 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 { @@ -48,7 +48,7 @@ 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. @@ -66,7 +66,7 @@ with_timeout_factor $timeout_factor { } } if { ! $ok } { - return -1 + return } gdb_test_no_output "save gdb-index -dwarf-5 $dir1" \ diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp index b39f51de44f..8f00ce920af 100644 --- a/gdb/testsuite/gdb.gdb/python-helper.exp +++ b/gdb/testsuite/gdb.gdb/python-helper.exp @@ -26,7 +26,7 @@ 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. diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/unittest.exp index 29e4206cb30..26870a7a0b7 100644 --- a/gdb/testsuite/gdb.gdb/unittest.exp +++ b/gdb/testsuite/gdb.gdb/unittest.exp @@ -24,7 +24,7 @@ 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 {} {