@@ -36,11 +36,11 @@
# file open per inferior.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# The test proper. NON_STOP indicates whether we're testing in
# non-stop, or all-stop mode.
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# At this point GDB will be busy handling the breakpoint hits and
# re-resuming the program. Even if GDB internally switches thread
# context, the user should not notice it. The following part of the
@@ -119,18 +119,18 @@ proc corefunc { threadtype executable } {
# build the test case first without threads
#
if {[build_executable $testfile $executable_nothr $srcfile] == -1} {
untested "attach-into-signal.exp (nonthreaded)"
- return -1
+ return
}
corefunc nonthreaded ${executable_nothr}
# build the test case also with threads
#
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" [standard_output_file ${executable_thr}] executable {debug additional_flags=-DUSE_THREADS}] != "" } {
untested "attach-into-signal.exp (threaded)"
- return -1
+ return
}
corefunc threaded ${executable_thr}
@@ -193,9 +193,9 @@ proc test {} {
# failure.
set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
$options] == -1} {
- return -1
+ return
}
test
@@ -132,11 +132,11 @@ proc test {target_non_stop non_stop cmd} {
kill_wait_spawned_process $test_spawn_id
}
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
foreach_with_prefix target-non-stop {"off" "on"} {
foreach_with_prefix non-stop {"off" "on"} {
foreach_with_prefix cmd {"attach" "attach&"} {
@@ -96,11 +96,11 @@ set testpid [spawn_id_get_pid $test_spawn_id]
# Start GDB with preload library in place.
if { [gdb_spawn_with_ld_preload $libobj] == -1 } {
# Make sure we get UNTESTED rather than UNRESOLVED.
set errcnt 0
untested "Couldn't start GDB with preloaded lib"
- return -1
+ return
}
# Load binary, and attach to running program.
gdb_load ${binfile}
gdb_test "attach $testpid" "Attaching to program.*" "attach to target"
@@ -77,18 +77,18 @@ proc corefunc { threadtype } {
# build the test case first without threads
#
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "attach-stopped.exp (unthreaded)"
- return -1
+ return
}
corefunc nonthreaded
# build the test case first without threads
#
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DUSE_THREADS}] != "" } {
untested "attach-stopped.exp (threaded)"
- return -1
+ return
}
corefunc threaded
@@ -19,11 +19,11 @@
# a breakpoint.
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart $::testfile
runto_main
@@ -23,11 +23,11 @@
# still threads running.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# The test proper. UPDATE_THREAD_LIST indicates whether we should do
# an "info threads" to sync the thread list after the first stop.
# ALWAYS_INSERTED indicates whether testing in "breakpoint
@@ -25,11 +25,11 @@ require !gdb_debug_enabled
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
# Case 1: libthread_db fakes a single thread with th_unique == NULL.
set thread_re1 "0 => $decimal => 0"
# Case 2: libthread_db already initialized.
@@ -26,11 +26,11 @@ if {![istarget *-*-linux*]} {
require can_spawn_for_attach
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
@@ -19,15 +19,15 @@
if {![istarget *-*-linux*]} {
return
}
if { [prepare_for_testing "failed to prepare" clone-new-thread-event] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
gdb_test "continue" \
"Thread 2 received signal SIGUSR1, User defined signal 1.*" \
"catch SIGUSR1"
@@ -21,15 +21,15 @@ if {![istarget *-*-linux*]} {
}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break clone_fn" "Breakpoint.*at.*file.*$srcfile.*line.*"
gdb_test "continue" "clone_fn .* at .*" "continue to clone_fn"
@@ -43,11 +43,11 @@
# Ref: https://sourceware.org/ml/gdb-patches/2015-01/msg00592.html
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
proc test {} {
global srcfile gdb_prompt
@@ -20,15 +20,15 @@
require {!target_info exists gdb,nointerrupts}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set break_line [gdb_get_line_number "break here"]
# Return current thread's number.
@@ -22,11 +22,11 @@
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
set iterations 10
for {set i 1} {$i <= $iterations} {incr i} {
with_test_prefix "iteration $i" {
@@ -28,15 +28,15 @@ standard_testfile
if {![istarget *-*-linux*]} {
return
}
if { [prepare_for_testing "failed to prepare" current-lwp-dead] } {
- return -1
+ return
}
if {[runto_main] <= 0} {
- return -1
+ return
}
# Run to "fn" so that thread 2 is made current.
gdb_breakpoint "fn"
gdb_continue_to_breakpoint "fn" ".*do_clone.*"
@@ -28,20 +28,20 @@ set libname $testfile-lib
set srcfile_lib $srcdir/$subdir/$libname.c
set binfile_lib [standard_output_file $libname.so]
if { [gdb_compile_shlib $srcfile_lib $binfile_lib {}] != "" } {
untested "failed to compile shared library 1"
- return -1
+ return
}
set binfile_lib_target [gdb_download_shlib $binfile_lib]
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
[list debug \
additional_flags=-DSHLIB_NAME=\"$binfile_lib_target\" \
shlib_load pthreads]] } {
- return -1
+ return
}
gdb_locate_shlib $binfile_lib
if {![runto_main]} {
@@ -352,15 +352,15 @@ proc_with_prefix test_detach_quit {condition_eval target_non_stop \
# wait at least as long as we may wait before declaring a time out
# failure.
set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Probe support for "set breakpoint condition-evaluation target".
# This setting influences who steps over the breakpoint, the (remote)
# target (e.g. gdbserver) or gdb, thus exposing issues on either the
@@ -31,16 +31,16 @@ set lib_dlopen [shlib_target_file ${executable}.so]
# PASS - it is OK if GDB processes it still before relocation.
set relink_args [build_executable_own_libs ${testfile}.exp ${executable}.so $srclibfile {debug shlib_pthreads} no]
if {$relink_args == "" || ![prelink_no $relink_args]
|| [prepare_for_testing "failed to prepare" ${executable} ${srcmainfile} {debug shlib_load}] } {
- return -1
+ return
}
gdb_load_shlib $binfile_lib
if { ![runto_main] } {
- return -1
+ return
}
set probe_names {}
# Fedora 17 name. There's specific code in
# svr4_find_and_create_probe_breakpoints to deal with this.
@@ -60,11 +60,11 @@ foreach probe_name $probe_names {
}
}
if { !$have_probe } {
untested "no matching probes"
- return -1
+ return
}
# We link the exec without -lpthread, but libpthread.so may already be loaded at main
# due to LD_PRELOAD.
set libpthread_maybe_preloaded 0
@@ -17,20 +17,20 @@
# Original image, loads a thread library.
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
# New image, that does not load a thread library.
set testfile1 "execl1"
set srcfile1 ${testfile1}.c
set binfile1 [standard_output_file ${testfile1}]
if {[gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if { [is_remote target] } {
gdb_remote_download target $binfile1
@@ -16,11 +16,11 @@
require allow_fork_tests
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {![runto_main]} {
@@ -16,11 +16,11 @@
require allow_fork_tests
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {![runto_main]} {
@@ -21,11 +21,11 @@ require allow_fork_tests
standard_testfile
set linenum [gdb_get_line_number "set break here"]
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# Assume yes.
set displaced_stepping_supported 1
@@ -15,19 +15,19 @@
standard_testfile
set corefile [standard_output_file ${testfile}.core]
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
gdb_test_no_output "set non-stop on"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_multiple "info threads" "threads are supported" {
-re ".* main .*\r\n$gdb_prompt $" {
# OK, threads are supported.
@@ -35,11 +35,11 @@ if {[istarget "*-*-linux"]} {
set opts [list debug]
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${objfile}" object $opts] != ""
|| ([gdb_compile_pthreads "${objfile}" "${binfile}" executable [concat $opts {ldflags=-Wl,-z,norelro}] ] != ""
&& [gdb_compile_pthreads "${objfile}" "${binfile}" executable $opts] != "") } {
- return -1
+ return
}
# Now we can proceed with the real testing.
# Start with a fresh gdb.
@@ -54,11 +54,11 @@ set horiz "\[^\n\r\]*"
set nl "\r\n"
set timeout 30
if {![runto_main]} {
- return -1
+ return
}
gdb_test_multiple "info threads" "threads are supported" {
-re ".* main .*$gdb_prompt $" {
# OK, threads are supported.
@@ -22,11 +22,11 @@ standard_testfile
# Some targets can't do function calls, so don't even bother with this
# test.
require {!target_info exists gdb,cannot_call_functions}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
- return -1
+ return
}
proc get_dummy_frame_number { } {
global gdb_prompt
@@ -17,11 +17,11 @@
# to stopped state once the call finishes.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -20,17 +20,17 @@
# breakpoint has been already deleted. moribund locations are not active in
# the default all-stop mode.
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
set test "info addr label"
gdb_test_multiple $test $test {
-re "Symbol \"label\" is at ${::hex}0 in .*\r\n$gdb_prompt $" {
@@ -35,22 +35,22 @@
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# Start GDB. Ensure we are in non-stop mode as we need to read from
# the inferior while it is running.
save_vars {GDBFLAGS} {
append GDBFLAGS { -ex "set non-stop on"}
clean_restart $::testfile
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint breakpt
gdb_continue_to_breakpoint "first breakpt call"
@@ -129,11 +129,11 @@ proc wait_for_stage { num } {
}
# Wait until we can see that the extra thread has been created.
if {![wait_for_stage 1]} {
unresolved "failed to see thread start"
- return -1
+ return
}
if {[target_info exists gdb_protocol]
&& ([target_info gdb_protocol] == "remote"
@@ -158,11 +158,11 @@ gdb_test_no_output "set variable spin = 0" \
"set 'spin' flag to allow worker thread to exit"
# Wait until the extra thread has exited.
if {![wait_for_stage 2]} {
unresolved "failed to see thread start"
- return -1
+ return
}
# Check that the second thread has gone away.
gdb_test {with print thread-events on -- p $_inferior_thread_count} \
"^${exit_thread_re}$re_var = 1" \
@@ -18,15 +18,15 @@
# function call from GDB.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint breakpt
gdb_continue_to_breakpoint "first breakpt call"
@@ -18,17 +18,17 @@ standard_testfile info-threads-cur-sal.c info-threads-cur-sal-2.c
set executable ${testfile}
if {[gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" \
"${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${executable}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "start"
gdb_continue_to_breakpoint "start"
@@ -17,20 +17,20 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
clean_restart $::testfile
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "stop_here"
gdb_test_multiple "continue -a&" "" {
-re "Continuing.\r\n$gdb_prompt " {
@@ -18,15 +18,15 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Read the number of threads out of the inferior.
set NUM_THREADS [get_integer_valueof "num_threads" -1]
@@ -23,11 +23,11 @@ standard_testfile
# Some targets can't do function calls, so don't even bother with this
# test.
require {!target_info exists gdb,cannot_call_functions}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if { ![runto_main] } {
@@ -18,21 +18,21 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{pthreads debug}] == -1} {
- return -1
+ return
}
if { ![runto "all_started"] } {
- return -1
+ return
}
delete_breakpoints
set testpid [get_valueof "" "pid" -1 "get pid of inferior"]
if { $testpid == -1 } {
- return -1
+ return
}
remote_exec target "kill -9 ${testpid}"
# Give it some time to die.
sleep 2
@@ -56,11 +56,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
@@ -19,17 +19,17 @@ require {!target_info exists gdb,nointerrupts}
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${executable}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
@@ -39,11 +39,11 @@ if {![istarget *-*-linux-gnu*]} {
return
}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
@@ -23,11 +23,11 @@ require allow_hw_watchpoint_multi_tests
standard_testfile
if {[gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile}" \
"${binfile}" executable {debug} ] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
@@ -38,11 +38,11 @@ standard_testfile
require allow_python_tests
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# Run the test. When SPAWN_INFERIOR is true the inferior is started
# as a separate process which GDB then attaches too. When
# SPAWN_INFERIOR is false the inferior is started directly within GDB.
@@ -26,11 +26,11 @@ if {[info exists DEBUG]} {
# make check RUNTESTFLAGS='gdb.threads/manythreads.exp DEBUG=1'
lappend opts "additional_flags=-DDEBUG"
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
@@ -17,18 +17,18 @@
# exiting, in non-stop mode. Originally based on multi-create.exp.
standard_testfile multi-create.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
gdb_test_no_output "set pagination off"
gdb_test_no_output "set non-stop on"
if {![runto_main]} {
- return -1
+ return
}
# Create a breakpoint that does "info threads" when hit, which will be
# just while other threads are being created or exiting.
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
@@ -16,11 +16,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
runto_main
@@ -21,11 +21,11 @@ set executable ${testfile}
require {!target_info exists gdb,nosignals}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
# Prepare environment for test.
proc setup {} {
@@ -19,11 +19,11 @@
require {!target_info exists gdb,no_thread_names}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
if {![runto "all_threads_ready"]} {
return
}
@@ -20,11 +20,11 @@
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# Test all "set scheduler-locking" variants.
foreach schedlock {"off" "step" "on" } {
with_test_prefix "schedlock=$schedlock" {
@@ -22,11 +22,11 @@ standard_testfile
set linenum [gdb_get_line_number "set break here"]
if {[prepare_for_testing "failed to prepare" \
$testfile $srcfile {c++ debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -18,17 +18,17 @@
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${executable}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
@@ -18,11 +18,11 @@
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
global executable
@@ -19,11 +19,11 @@
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
global executable
global tdlabel_re
@@ -21,11 +21,11 @@
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
global executable
@@ -20,11 +20,11 @@
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
proc do_test { lock_sched nonstop } {
global executable
@@ -17,15 +17,15 @@
standard_testfile
set executable ${testfile}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
@@ -21,17 +21,17 @@ set executable ${testfile}
require {!target_info exists gdb,nosignals}
set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} {
- return -1
+ return
}
gdb_test_no_output "set non-stop on"
if {![runto_main]} {
- return -1
+ return
}
# We want "handle print", to make sure the target backend reports the
# signal to the run control core.
gdb_test "handle SIGUSR1 print nostop pass" ""
@@ -34,11 +34,11 @@ if {[support_nested_function_tests]} {
lappend opts "additional_flags=-DHAVE_NESTED_FUNCTION_SUPPORT"
set have_nested_function_support 1
}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
- return -1
+ return
}
# gdb_openmp_setup may be defined to set auto-load safe-path and possibly
# sysroot. These settings are required for gdb to be able to find
# the libgomp python plugin. (sysroot only needs to be defined for
@@ -59,11 +59,11 @@ if {[info procs gdb_openmp_setup] != ""} {
return -1
}
}
if {![runto_main]} {
- return -1
+ return
}
# We want to invoke setup_kfail (and in some cases setup_xfail) when
# GDB does not yet have support for finding the values of variables in
# (non-master) threads. We'll check this by looking at the output of
@@ -22,22 +22,22 @@ standard_testfile
set have_nested_function_support 0
set opts {openmp debug}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
- return -1
+ return
}
if {[info procs gdb_openmp_setup] != ""} {
if {[gdb_openmp_setup $binfile] != ""} {
untested "could not set up OpenMP environment"
return -1
}
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "omp task shared"]
gdb_test "continue" ".*Breakpoint 2.*" "continue 1"
gdb_test "print share1" "= 9"
@@ -49,11 +49,11 @@
# breakpoint hit. GDB reports to the user a spurious SIGTRAP.
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {![runto_main]} {
@@ -25,11 +25,11 @@ standard_testfile
# regexp for "horizontal" text (i.e. doesn't include newline or
# carriage return)
set horiz "\[^\n\r\]*"
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
# Now we can proceed with the real testing.
clean_restart ${::testfile}
@@ -26,11 +26,11 @@
standard_testfile
set linenum [gdb_get_line_number "set break here"]
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
# The test proper. If COND_BP_TARGET is true, then test with
# conditional breakpoints evaluated on the target side, if possible.
@@ -30,11 +30,11 @@ if { ![istarget "*-*-linux*"] } {
}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
for {set iteration 0} {$iteration < 10} {incr iteration} {
with_test_prefix "iteration=$iteration" {
if {![runto_main]} {
@@ -20,11 +20,11 @@
# being blocked on a call to pthread_cond_wait().
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
runto_main
@@ -29,11 +29,11 @@ if {[istarget "*-*-linux"]} {
} else {
set target_cflags ""
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
@@ -15,11 +15,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {![runto_main]} {
@@ -27,11 +27,11 @@ set executable ${testfile}
if { [gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile}" \
"${binfile}" \
executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $executable
if {![runto_main]} {
@@ -26,11 +26,11 @@ standard_testfile
# The number of threads, including the main thread.
set NUM 2
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
# Now we can proceed with the real testing.
# Get the current contents of the `args` array in the test program.
@@ -18,17 +18,17 @@ set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" \
${binfile} \
executable \
[list debug additional_flags=-lrt]] != "" } {
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
# `nostop noprint pass' could in some cases report false PASS due to
# the (preempt 'handle') code path in linux-nat.c.
@@ -22,11 +22,11 @@ standard_testfile
require {!target_info exists gdb,nosignals}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Run the test proper. STEP_OVER indicates whether we leave in place
# a breakpoint that needs to be stepped over when we explicitly
# request a signal be delivered with the "signal" command.
@@ -20,11 +20,11 @@ standard_testfile
require {!target_info exists gdb,nosignals}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Run the test proper. SCHEDLOCK indicates which variant (around
# scheduler-locking) of the test to perform.
@@ -17,11 +17,11 @@ standard_testfile
require {!target_info exists gdb,nosignals}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Run test proper. COMMAND indicates whether to resume the inferior
# with "signal 0" or "continue".
@@ -20,11 +20,11 @@ standard_testfile
require {!target_info exists gdb,nosignals}
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}]} {
- return -1
+ return
}
# Run test proper. SIGTRAP_THREAD is the thread that should get the
# SIGTRAP.
@@ -27,11 +27,11 @@ set executable ${testfile}
require {!target_info exists gdb,nosignals}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
proc get_value {var test} {
global expect_out
global gdb_prompt
@@ -50,11 +50,11 @@ proc get_value {var test} {
# Start with a fresh gdb.
clean_restart $executable
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "set wait-thread-2 breakpoint here"]
gdb_continue_to_breakpoint "run to wait-thread-2 breakpoint"
gdb_test "info threads" "" "info threads with thread 2"
@@ -16,17 +16,17 @@
standard_testfile
set executable ${testfile}
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $executable
if {![runto_main]} {
- return -1
+ return
}
# `noprint' would not test the full logic of GDB.
gdb_test "handle SIGUSR1 nostop print pass" \
"\r\nSIGUSR1\[ \t\]+No\[ \t\]+Yes\[ \t\]+Yes\[ \t\].*"
@@ -19,11 +19,11 @@ standard_testfile
# This test requires sending ^C to interrupt the running target.
require {!target_info exists gdb,nointerrupts}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {![runto_main]} {
@@ -29,11 +29,11 @@
# been single-stepped, not continued.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -19,11 +19,11 @@
standard_testfile
set executable ${testfile}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
# The test proper. DISPLACED is true if we should try with displaced
# stepping. COMMAND is the execution command to test.
proc do_test {displaced command} {
@@ -24,11 +24,11 @@ set executable ${testfile}
# watchpoints.
require allow_hw_watchpoint_tests
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [list debug "incdir=${objdir}"]] != "" } {
- return -1
+ return
}
# The test proper. DISPLACED is true if we should try with displaced
# stepping. WITH_BP is true if we should try with a thread-specific
# breakpoint (for the wrong thread) right after the instruction that
@@ -23,18 +23,18 @@ set executable ${testfile}
if { [gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile}" \
"${binfile}" \
executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $executable
# Start the second thread.
if {![runto start]} {
- return -1
+ return
}
# Go back to the main thread, and leave it in the loop, where we're
# reasonably sure we don't have 'conditional jmp $pc'-like
# instructions. We wouldn't be able to detect whether a stepi makes
@@ -23,11 +23,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" \
"${testfile}" "${srcfile}" {debug pthreads}]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -24,11 +24,11 @@
# command.
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
runto_main
@@ -24,11 +24,11 @@
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pthreads}] == -1} {
- return -1
+ return
}
# We need to do things a little differently when using the remote protocol.
set is_remote \
[expr \
@@ -41,19 +41,19 @@ save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"maint set target-non-stop on\""
clean_restart ${::testfile}
}
if {![runto_main]} {
- return -1
+ return
}
# Check we hace non-stop mode. We do try to force this on above, but maybe
# the target doesn't support non-stop mode, in which case (hopefully)
# non-stop mode will still show as off, and this test should not be run.
if {![is_target_non_stop]} {
unsupported "required non-stop mode"
- return -1
+ return
}
delete_breakpoints
gdb_breakpoint "breakpt"
@@ -18,11 +18,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
# Run the test proper. SCHEDLOCK specifies what scheduler-locking
# should be set to.
@@ -16,11 +16,11 @@
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@gnu.org
standard_testfile linux-dp.c
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
@@ -19,11 +19,11 @@
standard_testfile
if {[gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcfile}" \
"${binfile}" executable {debug} ] != "" } {
- return -1
+ return
}
# Extract and return the thread ID of the thread stopped at function
# FUNC.
@@ -19,11 +19,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
# Return a list of the valid thread IDs, with the initial thread first.
proc get_thread_list { } {
global gdb_prompt
@@ -23,11 +23,11 @@ standard_testfile interrupted-hand-call.c
# Some targets can't do function calls, so don't even bother with this
# test.
require {!target_info exists gdb,cannot_call_functions}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if { ![runto_main] } {
@@ -33,11 +33,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
@@ -34,11 +34,11 @@ if {[target_info gdb_protocol] == "remote"
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
proc gdb_test_thread_start {messages_enabled command pattern message} {
global gdb_prompt
@@ -20,11 +20,11 @@
# and will continue for each thread even though an error may occur in
# backtracing one of the threads.
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
#
@@ -271,11 +271,11 @@ proc_with_prefix test_gcore {} {
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug pthreads}]} {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_test_no_output "set backtrace limit unlimited"
@@ -18,11 +18,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
runto_main
@@ -17,15 +17,15 @@
# exited thread is reused. GDB should not crash when this happens.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile { debug pthreads }] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
delete_breakpoints
# Avoid dumping a ton of thread create/exit info in the logs.
@@ -15,11 +15,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable { debug }] != "" } {
- return -1
+ return
}
# Generate a native core file.
set corefile [core_find $binfile]
@@ -15,11 +15,11 @@
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{pie}] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {![runto_main]} {
return 0
@@ -21,11 +21,11 @@ if {[istarget "*-*-linux"]} {
} else {
set target_cflags ""
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
if {![runto_main]} {
return 0
@@ -44,11 +44,11 @@ set binsharedfile [standard_output_file ${binsharedbase}]
# 'thread_local' to indicate thread local storage. This is available
# as a macro starting in C11 and became a C-language keyword in C23.
if { [build_executable "build library" ${binsharedfile} ${srcsharedfile} \
{debug shlib additional_flags=-std=c11}] == -1 } {
untested "Couldn't compile test library"
- return -1
+ return
}
# Strip debug information from $binsharedfile, placing it in
# ${binsharedfile}.debug. Also add a .gnu_debuglink in the former,
# pointing to the latter.
@@ -59,11 +59,11 @@ gdb_gnu_strip_debug ${binsharedfile}
if { [gdb_compile_pthreads \
"${srcdir}/${subdir}/${srcmainfile} ${binsharedfile}" \
"${binmainfile}" executable [list debug additional_flags=-std=c11]] \
!= "" } {
untested "Couldn't compile test program"
- return -1
+ return
}
set absdir [file dirname [standard_output_file ${binsharedbase}]]
if { [info exists ::env(LD_LIBRARY_PATH)] } {
set ld_library_path $::env(LD_LIBRARY_PATH)
@@ -23,11 +23,11 @@ set binfile_lib [standard_output_file ${libfile}.so]
remote_exec build "rm -f ${binfile}"
if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
|| [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_load_shlib ${binfile_lib}
@@ -22,11 +22,11 @@ set srcfile_lib ${libfile}.c
set binfile_lib [standard_output_file ${libfile}.so]
if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
|| [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_load_shlib ${binfile_lib}
@@ -20,11 +20,11 @@ set objmainfile [standard_output_file ${testfile}-main.o]
set executable ${testfile}
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != ""
|| [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objmainfile} object {}] != ""
|| [gdb_compile_pthreads "${objfile} ${objmainfile}" ${binfile} executable {}] != ""} {
- return -1
+ return
}
clean_restart ${executable}
if {![runto_main]} {
@@ -23,11 +23,11 @@ if {[istarget "*-*-linux"]} {
} else {
set target_cflags ""
}
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable [list c++ debug]] != "" } {
- return -1
+ return
}
### Compute the value of the a_thread_local variable.
proc compute_expected_value {value} {
set expected_value 0
@@ -19,11 +19,11 @@
require allow_fork_tests
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
# DETACH indicates whether "set detach-on-fork" is enabled. It is
# either "on" or "off".
@@ -19,11 +19,11 @@
require allow_fork_tests
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
- return -1
+ return
}
# DETACH indicates whether "set detach-on-fork" is enabled. It is
# either "on" or "off".
@@ -47,18 +47,18 @@ set nr_loops 20
# Compile the main program that calls vfork and hits a breakpoint.
set opts [list debug additional_flags=-DNR_LOOPS=$nr_loops]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
$opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Compile the secondary program, which just sleeps.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile_sleep}" "${binfile_sleep}" executable \
{debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
# We exercise two methods of getting a second inferior to execute while the
# first one vforks. METHOD can be:
#
@@ -30,11 +30,11 @@ if {![istarget *-*-linux*]} {
return 0
}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
- return -1
+ return
}
foreach reorder {0 1} { with_test_prefix "reorder$reorder" {
clean_restart $testfile
@@ -26,11 +26,11 @@ proc target_no_stopped_data { } {
return [istarget s390*-*-*]
}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart $::testfile
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
@@ -26,11 +26,11 @@ set X_INCR_COUNT 10
# so the test is only meaningful on a system with hardware watchpoints.
require allow_hw_watchpoint_tests
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
@@ -66,11 +66,11 @@ for { set i 0 } { $i < $NR_THREADS } { incr i } {
if { $nr_started == $NR_THREADS } {
pass "all threads started"
} else {
fail "all threads started"
# No point in continuing.
- return -1
+ return
}
# Check that multiple uses of the 'thread' keyword will give an error.
gdb_test "watch x thread 1 thread 2" "You can specify only one thread\\."
@@ -29,11 +29,11 @@ set NR_TRIGGERS_PER_THREAD 2
# only meaningful on a target with hardware watchpoint support.
require allow_hw_watchpoint_tests
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
# Force hardware watchpoints to be used.