@@ -22,11 +22,11 @@ standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
# First, use 'maint print reggroups' to get a list of all register
# groups.
set groups {}
@@ -22,11 +22,11 @@ standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
# First, use 'info registers' to get a list of register names.
set regs {}
gdb_test_multiple "info registers general" "info registers general" {
@@ -19,11 +19,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
# Test python/15461. Invalid architectures should not trigger an
# internal GDB assert.
gdb_py_test_silent_cmd "python empty = gdb.Architecture()" "get empty arch" 0
@@ -27,17 +27,17 @@ standard_testfile .c -f1.c -f2.c
set f1_o [standard_output_file ${gdb_test_file_name}-f1.o]
set f2_o [standard_output_file ${gdb_test_file_name}-f2.o]
# Now build the object files.
if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" ${f1_o} object {}] != ""} {
- untested "failed to compile object file f1.o"
- return -1
+ untested "failed to compile object file f1.o"
+ return
}
if {[gdb_compile "${srcdir}/${subdir}/${srcfile3}" ${f2_o} object {}] != ""} {
- untested "failed to compile object file f2.o"
- return -1
+ untested "failed to compile object file f2.o"
+ return
}
# Copy the two Python scripts to where the tests are being run.
set remote_python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}-f1.o-gdb.py]
@@ -48,11 +48,11 @@ set remote_python_file [gdb_remote_download host \
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
return
}
if {![runto_main]} {
- return -1
+ return
}
set safe_path [standard_output_file ""]
gdb_test_no_output "set auto-load safe-path ${safe_path}" \
"set auto-load safe-path"
@@ -28,24 +28,24 @@ if { $kind == "obj" } {
set binfile [standard_output_file $testfile]
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile object \
"debug"] != "" } {
untested "failed to compile object file $testfile"
- return -1
+ return
}
clean_restart $testfile
} else {
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if { ![runto_main] } {
fail "can't run to main"
- return 0
+ return
}
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-disasm.py]
@@ -313,11 +313,11 @@ with_test_prefix "gdb exiting: normal" {
with_test_prefix "gdb exiting: error" {
clean_restart ${testfile}
if {![runto_main]} {
fail "cannot run to main."
- return 0
+ return
}
gdb_test_no_output "source ${pyfile}" "load python file"
gdb_test "test-exiting-event error" "GDB exiting event registered\\."
gdb_test "test-events" "Event testers registered\\."
@@ -35,11 +35,11 @@ set B_desc "'B' is a struct/class with the following fields:.*\
A = <Enter 0 to explore this base class of type 'A'>.*\
i = <Enter 1 to explore this field of type 'int'>.*\
c = <Enter 2 to explore this field of type 'char'>.*"
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
gdb_continue_to_breakpoint "Break here" ".*Break here.*"
@@ -74,11 +74,11 @@ proc scalar_value { value_name value } {
}
set SS_fields [field_values {a = 10} {d = 100[.].*}]
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
gdb_continue_to_breakpoint "Break here" ".*Break here.*"
@@ -44,11 +44,11 @@ clean_restart ${testfile}
with_test_prefix "normal conditions" {
clean_restart ${testfile}
gdb_load_shlib ${lib_sl}
if {![runto_main]} {
- return 0
+ return
}
set python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
@@ -96,11 +96,11 @@ with_test_prefix "return to inlined function" {
gdb_test "source $python_file" "Python script imported.*" \
"import python scripts"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "increase_2"
gdb_test "continue" "Breakpoint .*at.*" "continue to the function to finish"
@@ -122,11 +122,11 @@ with_test_prefix "no debug symbol" {
gdb_test "source $python_file" "Python script imported.*" \
"import python scripts"
set cond_line [gdb_get_line_number "Condition Break."]
if {![runto_main]} {
- return 0
+ return
}
gdb_test "print do_nothing" "no debug info.*" "ensure that shared lib has no debug info"
gdb_breakpoint "do_nothing" {temporary}
gdb_test "continue" "Temporary breakpoint .*in \\.?do_nothing.*" \
@@ -177,11 +177,11 @@ with_test_prefix "finish in dummy frame" {
gdb_test "source $python_file" "Python script imported.*" \
"import python scripts"
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break ${cond_line} if test_1(i,8)" "Breakpoint .* at .*" \
"set a conditional BP"
gdb_test "python TestBreakpoint()" "TestBreakpoint init" \
@@ -204,11 +204,11 @@ with_test_prefix "finish in normal frame" {
gdb_test "source $python_file" "Python script imported.*" \
"import python scripts"
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break ${cond_line} if test(i,8)" \
"Breakpoint .* at .*" "set conditional BP"
gdb_test "python TestBreakpoint()" "TestBreakpoint init" "set BP in condition"
@@ -233,11 +233,11 @@ with_test_prefix "explicit inferior function call" {
gdb_test "source $python_file" "Python script imported.*" \
"import python scripts"
if {![runto_main]} {
- return 0
+ return
}
# return address in dummy frame
gdb_test "python TestExplicitBreakpoint('increase_1')" "Breakpoint.*at.*" \
@@ -260,11 +260,11 @@ with_test_prefix "explicit inferior function call" {
# Test FinishBreakpoint when inferior exits
#
with_test_prefix "inferior exit" {
if {![runto "test_exec_exit"]} {
- return 0
+ return
}
gdb_test_no_output "set var self_exec = 0" "switch to exit() test"
gdb_test "python SimpleFinishBreakpoint(gdb.newest_frame())" "SimpleFinishBreakpoint init" "set FinishBP after the exit()"
gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exit"
@@ -274,11 +274,11 @@ with_test_prefix "inferior exit" {
# Test FinishBreakpoint when inferior execs
#
with_test_prefix "inferior exec" {
if {![runto "test_exec_exit"]} {
- return 0
+ return
}
gdb_test "python SimpleFinishBreakpoint(gdb.newest_frame())" "SimpleFinishBreakpoint init" "set FinishBP after the exec"
gdb_test "catch exec" "Catchpoint.*\(exec\).*"
gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exec"
@@ -21,11 +21,11 @@ foreach func_name { foo bar } {
if {[build_executable "build binary with ${func_name} function" \
"$testfile-${func_name}" $srcfile \
[list debug \
nopie \
additional_flags=-DFUNCTION_NAME=${func_name}]] == -1} {
- return -1
+ return
}
}
set testfile_foo $testfile-foo
set testfile_bar $testfile-bar
@@ -33,11 +33,11 @@ set binary_foo [standard_output_file $testfile_foo]
set binary_bar [standard_output_file $testfile_bar]
clean_restart $testfile_foo
if {![runto_main]} {
- return -1
+ return
}
# Check the gdb.format_address method when using the default values
# for the program space and architecture (these will be selected based
# on the current inferior).
@@ -26,11 +26,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
# Run to our test breakpoint.
gdb_breakpoint [gdb_get_line_number "Break here"]
gdb_continue_to_breakpoint "run to test breakpoint"
@@ -23,11 +23,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
# Use Python to print the value of the 'some_label' symbol.
gdb_test "python frame = gdb.selected_frame()"
gdb_test "python frame_pc = frame.pc()"
@@ -41,11 +41,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "python print(gdb.selected_frame().function().symtab.fullname())" \
"py-linetable-empty.c" "Test main has symtab"
@@ -62,11 +62,11 @@ proc test_printers { s_prefix } {
# Test registration with verbose off.
with_test_prefix "verbose off" {
if {![prepare_test]} {
- return -1
+ return
}
gdb_test_no_output "set verbose off"
gdb_test_no_output "py gdb.printing.register_pretty_printer(gdb, lookup_function_lookup_test)"
@@ -77,11 +77,11 @@ with_test_prefix "verbose off" {
# Test registration with verbose on.
with_test_prefix "verbose on" {
if {![prepare_test]} {
- return -1
+ return
}
gdb_test_no_output "set verbose on"
gdb_test "py gdb.printing.register_pretty_printer(gdb, lookup_function_lookup_test)" \
@@ -94,11 +94,11 @@ with_test_prefix "verbose on" {
# Exercise the "replace" argument to register_pretty_printer.
with_test_prefix "replace" {
if {![prepare_test]} {
- return -1
+ return
}
gdb_test_no_output "py gdb.printing.register_pretty_printer(gdb, lookup_function_lookup_test)"
gdb_test_no_output "py gdb.printing.register_pretty_printer(progspace, my_pretty_printer1)"
gdb_test "py gdb.printing.register_pretty_printer(progspace, my_pretty_printer2, replace=False)" \
@@ -68,11 +68,11 @@ save_vars { INTERNAL_GDBFLAGS GDBFLAGS } {
"prompt_hook argument is default prompt. 2"
gdb_exit
}
if {![can_spawn_for_attach]} {
- return 0
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
@@ -25,10 +25,10 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_py_run_memory_leak_test ${srcdir}/${subdir}/${testfile}.py \
"buffers returned by read_memory() deallocates correctly"
@@ -21,11 +21,13 @@ require allow_btrace_tests allow_python_tests
load_lib gdb-python.exp
standard_testfile
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 }
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
+ return
+}
if {![runto_main]} {
return
}
@@ -21,11 +21,13 @@ require supports_process_record allow_python_tests
load_lib gdb-python.exp
standard_testfile
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 }
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
+ return
+}
if {![runto_main]} {
return
}
@@ -25,11 +25,11 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile \
{debug c++ additional_flags="-std=c++11"}]} {
return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
gdb_continue_to_breakpoint "Break here" ".*Break here.*"
@@ -23,11 +23,11 @@ standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
gdb_continue_to_breakpoint "Break here" ".*Break here.*"
@@ -838,11 +838,11 @@ test_value_after_death
test_subscript_regression "${binfile}" "c"
if {[allow_cplus_tests]} {
if { [build_inferior "${binfile}-cxx" "c++"] < 0 } {
- return -1
+ return
}
with_test_prefix "c++" {
test_subscript_regression "${binfile}-cxx" "c++"
}
}
@@ -25,11 +25,11 @@ standard_testfile py-xmethods.cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return
}
if {![runto_main]} {
- return -1
+ return
}
set xmethods_script [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
@@ -46,11 +46,11 @@ gdb_test_multiple "python print (23)" "verify python support" {
gdb_test_multiline "multi-line python command" \
"python" "" \
"print (23)" "" \
"end" "not supported.*"
- return -1
+ return
}
-re "$gdb_prompt $" {}
}
gdb_test_multiline "multi-line python command" \