Most changes are the result of running:
$ sed -i 's/^ return -1/ return/' *.exp
inside gdb/testsuite/gdb.linespec. The exceptions fall into one of
these criteria:
- misaligned line, which is then fixed by this patch;
- return at top level but inside a namespace block.
A couple of "return 0" statements were also fixed.
---
gdb/testsuite/gdb.linespec/break-ask.exp | 2 +-
gdb/testsuite/gdb.linespec/break-asm-file.exp | 8 ++++----
gdb/testsuite/gdb.linespec/cp-completion-aliases.exp | 2 +-
.../gdb.linespec/cp-replace-typedefs-ns-template.exp | 2 +-
gdb/testsuite/gdb.linespec/cpcompletion.exp | 4 ++--
gdb/testsuite/gdb.linespec/cpexplicit.exp | 4 ++--
gdb/testsuite/gdb.linespec/cpls-abi-tag.exp | 4 ++--
gdb/testsuite/gdb.linespec/cpls-ops.exp | 4 ++--
gdb/testsuite/gdb.linespec/errors.exp | 2 +-
gdb/testsuite/gdb.linespec/explicit.exp | 4 ++--
gdb/testsuite/gdb.linespec/keywords.exp | 4 ++--
gdb/testsuite/gdb.linespec/linespec.exp | 2 +-
gdb/testsuite/gdb.linespec/ls-dollar.exp | 2 +-
gdb/testsuite/gdb.linespec/macro-relative.exp | 2 +-
gdb/testsuite/gdb.linespec/skip-two.exp | 6 +++---
gdb/testsuite/gdb.linespec/thread.exp | 4 ++--
16 files changed, 28 insertions(+), 28 deletions(-)
@@ -40,11 +40,11 @@ with_cwd $srcdir/${subdir}/base/two {
}
}
if { [gdb_compile "$srcdir/${subdir}/$srcfile $objfile1 $objfile2" \
$binfile executable $opts] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
gdb_test_no_output "set multiple-symbols ask"
@@ -26,26 +26,26 @@ set asm_file0 break-asm-file0.S
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
object {debug nowarnings optimize=-O0}] != ""} {
- return -1
+ return
}
# Compile .s files without debug information.
if {[gdb_compile ${srcdir}/${subdir}/$asm_file0 ${binfile}2.o \
object {nodebug}] != ""} {
- return -1
+ return
}
if {[gdb_compile ${srcdir}/${subdir}/$asm_file1 ${binfile}3.o \
object {nodebug}] != ""} {
- return -1
+ return
}
if {[gdb_compile [list ${binfile}1.o ${binfile}2.o ${binfile}3.o] \
"${binfile}" executable {}] != ""} {
- return -1
+ return
}
clean_restart $execfile
gdb_test "break a/$asm_file0:func" \
@@ -19,11 +19,11 @@
load_lib completion-support.exp
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
# Disable the completion limit for the whole testcase.
gdb_test_no_output "set max-completions unlimited"
@@ -21,11 +21,11 @@ load_lib completion-support.exp
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug c++ additional_flags=-std=c++11}]} {
- return -1
+ return
}
# Disable the completion limit for the whole testcase.
gdb_test_no_output "set max-completions unlimited"
@@ -28,19 +28,19 @@ lappend opts additional_flags=-std=c++11
set flags {}
lappend flags debug
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2 $srcfile3 $srcfile4] $opts]} {
- return -1
+ return
}
# Tests below are about tab-completion, which doesn't work if readline
# library isn't used. Check it first.
if { ![readline_is_used] } {
untested "no tab completion support without readline"
- return -1
+ return
}
#
# Some convenience procedures for testing template parameter list
# completion.
@@ -20,11 +20,11 @@ require allow_cplus_tests
standard_testfile .cc
set exefile $testfile
if {[prepare_for_testing "failed to prepare" $exefile $srcfile \
{c++ debug nowarnings}]} {
- return -1
+ return
}
# Wrap this whole test in a namespace to avoid contaminating other tests.
namespace eval $testfile {
upvar #0 ::srcfile srcfile
@@ -88,11 +88,11 @@ namespace eval $testfile {
add linespecs "-function \"myclass::operator,\"" $location(operator)
# Fire up gdb.
if {![runto_main]} {
namespace delete $testfile
- return -1
+ return
}
# Test explicit linespecs, with and without conditions.
foreach linespec $linespecs(linespecs) loc_pattern $linespecs(locations) {
# Test the linespec
@@ -29,19 +29,19 @@ if { [test_compiler_info gcc-*] } {
require {expr {[gcc_major_version] >= 5}}
}
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile] {c++ debug}]} {
- return -1
+ return
}
# Tests below are about tab-completion, which doesn't work if readline
# library isn't used. Check it first.
if { ![readline_is_used] } {
untested "no tab completion support without readline"
- return -1
+ return
}
gdb_test_no_output "set max-completions unlimited"
# Check that the explicit location completer manages to find the next
@@ -23,19 +23,19 @@ set flags {}
lappend flags debug
lappend flags c++
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile] $flags]} {
- return -1
+ return
}
# Tests below are about tab-completion, which doesn't work if readline
# library isn't used. Check it first.
if { ![readline_is_used] } {
untested "no tab completion support without readline"
- return -1
+ return
}
gdb_test_no_output "set max-completions unlimited"
# Check that the explicit location completer manages to find the next
@@ -17,11 +17,11 @@
# We don't currently need our own test case for testing, so grab
# another one.
if {[prepare_for_testing "failed to prepare" linespecs keywords.c]} {
- return -1
+ return
}
# PR gdb/12843
gdb_test "list c:/foo/bar/baz.c:1" "No source file named c:/foo/bar/baz.c."
gdb_test "list c:/foo/bar/baz.c" "Function \"c:/foo/bar/baz.c\" not defined."
@@ -25,11 +25,11 @@ lappend opts debug
lappend opts nowarnings
lappend opts additional_flags=-nostdlib
if {[prepare_for_testing "failed to prepare" $exefile \
[list $srcfile $srcfile2 $srcfile3] $opts]} {
- return -1
+ return
}
# Wrap the entire test in a namespace to avoid contaminating other tests.
namespace eval $testfile {
upvar #0 ::srcfile srcfile
@@ -96,11 +96,11 @@ namespace eval $testfile {
add linespecs "-function myfunction -label top -line 3" $location(top)
add linespecs "-line 25" $location(normal)
# Fire up gdb.
if {![runto_main]} {
- return -1
+ return
}
# Turn off queries
gdb_test_no_output "set confirm off"
@@ -17,15 +17,15 @@
standard_testfile
set exefile $testfile
if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return 0
+ return
}
# Turn off pending breakpoints to facilitate testing errors.
gdb_test_no_output "set breakpoint pending off"
@@ -25,11 +25,11 @@ set basetwo base/two/thefile.cc
require allow_cplus_tests
if {[prepare_for_testing "failed to prepare" $exefile \
[list $srcfile $baseone $basetwo] \
{debug nowarnings c++}]} {
- return -1
+ return
}
gdb_test_no_output "set multiple-symbols all" \
"set multiple-symbols to all for linespec tests"
@@ -20,11 +20,11 @@ set exefile $testfile
require allow_cplus_tests
if {[prepare_for_testing "failed to prepare" $exefile $srcfile \
{debug nowarnings c++}]} {
- return -1
+ return
}
gdb_test_no_output "set listsize 1"
set line [gdb_get_line_number {dollar_func}]
@@ -40,9 +40,9 @@ clean_restart ${testfile}
# Test macros respect DW_AT_comp_dir.
# "list header_two_func" does not set exactly the one line we want.
if {![runto header_two_func]} {
- return -1
+ return
}
gdb_test "info macro HEADER" "\r\n#define HEADER 2"
@@ -23,18 +23,18 @@ set basetwo base/two/thefile.cc
require allow_cplus_tests
if {[prepare_for_testing "failed to prepare" $execfile \
[list $srcfile $baseone $basetwo] \
{debug nowarnings c++}]} {
- return -1
+ return
}
gdb_test "skip function dupname" \
{Function dupname will be skipped when stepping\.}
if {![runto_main]} {
- return -1
+ return
}
set test "dupname ignored from main"
gdb_test_multiple "step" $test {
-re "^step\r\ndupname .*\r\n$gdb_prompt $" {
@@ -62,11 +62,11 @@ gdb_test_no_output "skip delete 1"
gdb_test "skip file thefile.cc" \
{File thefile\.cc will be skipped when stepping\.}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "step" "static int dupname .*" "step into dupname"
gdb_test "finish" "return dupname.* body_elsewhere.*" "finish from dupname"
@@ -18,15 +18,15 @@
standard_testfile
set exefile $testfile
if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return 0
+ return
}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
gdb_test "break $srcfile:$bp_location1" \