2012-02-24 Pedro Alves <palves@redhat.com>

* gdb.threads/attach-into-signal.exp (corefunc): Use
	with_test_prefix.
This commit is contained in:
Pedro Alves 2012-02-24 14:06:29 +00:00
parent 8a8bc27fb3
commit 13fc3e3cf9
2 changed files with 114 additions and 113 deletions

View File

@ -1,3 +1,8 @@
2012-02-24 Pedro Alves <palves@redhat.com>
* gdb.threads/attach-into-signal.exp (corefunc): Use
with_test_prefix.
2012-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix false FAILs on old CPUs without SSE.

View File

@ -39,18 +39,14 @@ proc corefunc { threadtype executable } {
global objdir
global subdir
global gdb_prompt
global pf_prefix
set save_pf_prefix $pf_prefix
lappend pf_prefix "$threadtype:"
with_test_prefix "$threadtype" {
clean_restart ${executable}
set binfile ${objdir}/${subdir}/${executable}
set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${executable}]
if [get_compiler_info ${binfile}] {
set pf_prefix $save_pf_prefix
return -1
}
@ -83,7 +79,8 @@ proc corefunc { threadtype executable } {
close $fileid;
if {![string match "*(stopped)*" $line2]} {
# No PASS message as we may be looping in multiple attempts.
# No PASS message as we may be looping in multiple
# attempts.
break
}
sleep 1
@ -108,14 +105,14 @@ proc corefunc { threadtype executable } {
set ok 0
if { $threadtype == "threaded" } {
# In the threaded case, the signal is left pending
# on the second thread. Check for that by peeking
# at the thread's siginfo. SIGALRM is 14, SIGSTOP
# is 19.
# In the threaded case, the signal is left
# pending on the second thread. Check for
# that by peeking at the thread's siginfo.
# SIGALRM is 14, SIGSTOP is 19.
# With remote targets, we need to pull the thread
# list explicitly before GDB even knows about
# thread 2.
# With remote targets, we need to pull the
# thread list explicitly before GDB even knows
# about thread 2.
set test2 "pull thread list"
gdb_test_multiple "info threads" $test2 {
-re "\r\n$gdb_prompt $" {
@ -162,10 +159,9 @@ proc corefunc { threadtype executable } {
gdb_exit
# Make sure we don't leave a process around to confuse
# the next test run (and prevent the compile by keeping
# the text file busy), in case the "set should_exit" didn't
# work.
# Make sure we don't leave a process around to confuse the
# next test run (and prevent the compile by keeping the text
# file busy), in case the "set should_exit" didn't work.
# Continue the program - some Linux kernels need it before -9 if the
# process is stopped.
@ -173,7 +169,7 @@ proc corefunc { threadtype executable } {
remote_exec build "kill -9 ${testpid}"
set pf_prefix $save_pf_prefix
}
}
# build the test case first without threads