cafda5977a
I see these two fails in no-unwaited-for-left.exp in remote testing for aarch64-linux target. ... continue Continuing. warning: Remote failure reply: E.No unwaited-for children left. [Thread 1084] #2 stopped. (gdb) FAIL: gdb.threads/no-unwaited-for-left.exp: continue stops when thread 2 exits .... continue Continuing. warning: Remote failure reply: E.No unwaited-for children left. [Thread 1081] #1 stopped. (gdb) FAIL: gdb.threads/no-unwaited-for-left.exp: continue stops when the main thread exits I checked the gdb.log on buildbot, and find that these two fails also appear on Debian-i686-native-extended-gdbserver and Fedora-ppc64be-native-gdbserver-m64. I recall that they are about local/remote parity, and related RSP is missing. There has been already a PR 14618 about it. This patch is to kfail them on remote target. gdb/testsuite: 2015-04-02 Yao Qi <yao.qi@linaro.org> * gdb.threads/no-unwaited-for-left.exp: Set up kfail if target is remote.
77 lines
2.8 KiB
Text
77 lines
2.8 KiB
Text
# Copyright (C) 2007-2015 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# Exit of a thread when there are other threads in the inferior should
|
|
# not hang GDB.
|
|
|
|
standard_testfile
|
|
set executable ${testfile}
|
|
|
|
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
return -1
|
|
}
|
|
|
|
clean_restart ${executable}
|
|
|
|
if ![runto_main] {
|
|
return -1
|
|
}
|
|
|
|
gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"]
|
|
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
|
|
|
# Resume only the second thread
|
|
gdb_test_no_output "set scheduler-locking on" \
|
|
"enable scheduler-locking, for thread 2"
|
|
|
|
# Continue. Thread 2 exits, and the main thread was already stopped.
|
|
if [is_remote target] {
|
|
setup_kfail "gdb/14618" "*-*-*"
|
|
}
|
|
gdb_test "continue" \
|
|
"No unwaited-for children left." \
|
|
"continue stops when thread 2 exits"
|
|
|
|
gdb_test "info threads" \
|
|
"\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n *1 *Thread \[^\r\n\]* \[^\r\n\]*.*The current thread <Thread ID 2> has terminated.*" \
|
|
"only main thread left, thread 2 terminated"
|
|
|
|
# Select the main thread, let the third thread start, and stop at the
|
|
# main thread breakpoint.
|
|
gdb_test "thread 1" "" "select main thread"
|
|
gdb_test_no_output "set scheduler-locking off" \
|
|
"disable scheduler-locking, letting new thread start"
|
|
|
|
gdb_breakpoint $srcfile:[gdb_get_line_number "break-here-2"]
|
|
gdb_continue_to_breakpoint "break-here-2" ".* break-here-2 .*"
|
|
|
|
# Let the main thread continue alone.
|
|
gdb_test_no_output "set scheduler-locking on" \
|
|
"enable scheduler-locking, for main thread"
|
|
# The main thread exits, and thread 3 was already stopped.
|
|
if [is_remote target] {
|
|
setup_kfail "gdb/14618" "*-*-*"
|
|
}
|
|
gdb_test "continue" \
|
|
"No unwaited-for children left." \
|
|
"continue stops when the main thread exits"
|
|
|
|
gdb_test "info threads" \
|
|
"\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n *3 *Thread \[^\r\n\]* \[^\r\n\]*.*The current thread <Thread ID 1> has terminated.*" \
|
|
"only thread 3 left, main thread terminated"
|
|
|
|
# Make sure thread apply all works when we have exited threads in the
|
|
# list.
|
|
gdb_test "thread apply all print 999" " = 999" "thread apply all with exited thread"
|