Drop the gdb.threads/attach-into-signal.exp change as obsolete.
This commit is contained in:
parent
f6cec01799
commit
c1c2c92c21
@ -79,183 +79,6 @@ Index: gdb-6.8.50.20081128/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
static LONGEST
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-05-01 20:50:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.c 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -1,19 +1,20 @@
|
||||
/* This testcase is part of GDB, the GNU debugger.
|
||||
|
||||
- Copyright 2008 Free Software Foundation, Inc.
|
||||
+ Copyright 2007 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
|
||||
+ the Free Software Foundation; either version 2 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/>. */
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
@@ -40,8 +41,10 @@ static void *func (void *arg)
|
||||
|
||||
raise (SIGALRM);
|
||||
|
||||
- /* We must not get past this point, either in a free standing or debugged
|
||||
- state. */
|
||||
+ /* This should be NOTREACHED but sometimes it is reached - Bug 427860.
|
||||
+ We never get here without ptrace(2). It may also be a kernel bug. */
|
||||
+ for (;;)
|
||||
+ pause ();
|
||||
|
||||
abort ();
|
||||
/* NOTREACHED */
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-05-01 20:50:14.000000000 +0200
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-into-signal.exp 2008-12-06 21:57:23.000000000 +0100
|
||||
@@ -1,27 +1,29 @@
|
||||
-# Copyright 2008
|
||||
-# Free Software Foundation, Inc.
|
||||
+# Copyright 2007
|
||||
|
||||
# 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
|
||||
+# the Free Software Foundation; either version 2 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/>.
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# This test was created by modifying attach-stopped.exp.
|
||||
# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
||||
|
||||
-# This test only works on Linux
|
||||
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
|
||||
- continue
|
||||
+if $tracelevel then {
|
||||
+ strace $tracelevel
|
||||
}
|
||||
|
||||
+set prms_id 0
|
||||
+set bug_id 0
|
||||
+
|
||||
set testfile "attach-into-signal"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
@@ -60,6 +62,10 @@ proc corefunc { threadtype } {
|
||||
set attempt 1
|
||||
set passes 1
|
||||
while { $passes < 3 && $attempt <= $attempts } {
|
||||
+
|
||||
+ # Start with clean gdb
|
||||
+ gdb_exit
|
||||
+
|
||||
set stoppedtry 0
|
||||
while { $stoppedtry < 10 } {
|
||||
if [catch {open /proc/${testpid}/status r} fileid] {
|
||||
@@ -83,10 +89,30 @@ proc corefunc { threadtype } {
|
||||
break
|
||||
}
|
||||
|
||||
+ gdb_start
|
||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||
+ gdb_load ${binfile}
|
||||
+
|
||||
+ # No PASS message as we may be looping in multiple attempts.
|
||||
+ gdb_test "set debug lin-lwp 1" "" ""
|
||||
+
|
||||
+ set test "$threadtype: set file (pass $passes), before attach1 to stopped process"
|
||||
+ if {[gdb_test_multiple "file $binfile" $test {
|
||||
+ -re "Load new symbol table from.*y or n. $" {
|
||||
+ # No PASS message as we may be looping in multiple attempts.
|
||||
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." ""
|
||||
+ }
|
||||
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
|
||||
+ # No PASS message as we may be looping in multiple attempts.
|
||||
+ }
|
||||
+ }] != 0 } {
|
||||
+ break
|
||||
+ }
|
||||
+
|
||||
# Main test:
|
||||
set test "$threadtype: attach (pass $passes), pending signal catch"
|
||||
if {[gdb_test_multiple "attach $testpid" $test {
|
||||
- -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*Received Alarm clock.*$gdb_prompt $" {
|
||||
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*Redelivering pending Alarm clock..*$gdb_prompt $" {
|
||||
# nonthreaded:
|
||||
pass $test
|
||||
verbose -log "$test succeeded on the attempt # $attempt of $attempts"
|
||||
@@ -97,7 +123,7 @@ proc corefunc { threadtype } {
|
||||
# We just lack the luck, we should try it again.
|
||||
set attempt [expr $attempt + 1]
|
||||
}
|
||||
- -re "Attaching to process $testpid.*Received Alarm clock.*$gdb_prompt $" {
|
||||
+ -re "Attaching to process $testpid.*Redelivering pending Alarm clock..*$gdb_prompt $" {
|
||||
# threaded:
|
||||
pass $test
|
||||
verbose -log "$test succeeded on the attempt # $attempt of $attempts"
|
||||
@@ -111,8 +137,6 @@ proc corefunc { threadtype } {
|
||||
}] != 0 } {
|
||||
break
|
||||
}
|
||||
-
|
||||
- gdb_test "detach" "Detaching from.*" ""
|
||||
}
|
||||
if {$passes < 3} {
|
||||
if {$attempt > $attempts} {
|
||||
@@ -138,20 +162,12 @@ proc corefunc { threadtype } {
|
||||
remote_exec build "kill -9 ${testpid}"
|
||||
}
|
||||
|
||||
-# Start with clean gdb
|
||||
-gdb_exit
|
||||
-
|
||||
# build the test case first without threads
|
||||
#
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
gdb_suppress_entire_file "Testcase nonthraded compile failed, so all tests in this file will automatically fail."
|
||||
}
|
||||
|
||||
-gdb_start
|
||||
-gdb_reinitialize_dir $srcdir/$subdir
|
||||
-gdb_load ${binfile}
|
||||
-gdb_test "set debug lin-lwp 1" "" ""
|
||||
-
|
||||
corefunc nonthreaded
|
||||
|
||||
# build the test case also with threads
|
||||
@@ -160,9 +176,4 @@ if { [gdb_compile_pthreads "${srcdir}/$
|
||||
gdb_suppress_entire_file "Testcase threaded compile failed, so all tests in this file will automatically fail."
|
||||
}
|
||||
|
||||
-gdb_start
|
||||
-gdb_reinitialize_dir $srcdir/$subdir
|
||||
-gdb_load ${binfile}
|
||||
-gdb_test "set debug lin-lwp 1" "" ""
|
||||
-
|
||||
corefunc threaded
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/attach-stopped.c
|
||||
===================================================================
|
||||
--- gdb-6.8.50.20081128.orig/gdb/testsuite/gdb.threads/attach-stopped.c 2008-05-01 20:50:14.000000000 +0200
|
||||
|
Loading…
Reference in New Issue
Block a user