Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: gdb/testsuite/gdb.base/catch-signal-fork.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/catch-signal-fork.c ('k') | gdb/testsuite/gdb.base/catch-syscall.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/catch-signal-fork.exp
diff --git a/gdb/testsuite/gdb.base/siginfo-infcall.exp b/gdb/testsuite/gdb.base/catch-signal-fork.exp
similarity index 50%
copy from gdb/testsuite/gdb.base/siginfo-infcall.exp
copy to gdb/testsuite/gdb.base/catch-signal-fork.exp
index d84cd264e4f624a16a23451bc5e2f6ca26868152..cb4b91891a144e80c07a95e1a1f5cb511ec90194 100644
--- a/gdb/testsuite/gdb.base/siginfo-infcall.exp
+++ b/gdb/testsuite/gdb.base/catch-signal-fork.exp
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Free Software Foundation, Inc.
+# Copyright 2012-2013 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
@@ -14,34 +14,30 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if [target_info exists gdb,nosignals] {
- verbose "Skipping siginfo-infcall.exp because of nosignals."
+ verbose "Skipping catch-signal-fork.exp because of nosignals."
continue
}
-set testfile siginfo-infcall
-set srcfile ${testfile}.c
-set executable ${testfile}
-if { [prepare_for_testing ${testfile}.exp $executable] } {
+standard_testfile
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
return -1
}
-if ![runto_main] {
+if {![runto_main]} {
return -1
}
-gdb_breakpoint "pass"
-gdb_breakpoint "fail"
-
-gdb_test "continue" "Program received signal SIGUSR1, .*" "continue to SIGUSR1"
+# Test "catch signal SIGHUP"
+gdb_test "catch signal SIGHUP" "Catchpoint .*"
+gdb_breakpoint ${srcfile}:[gdb_get_line_number "first HUP"]
+gdb_breakpoint ${srcfile}:[gdb_get_line_number "fork loop"]
-gdb_test "p callme ()" " = 42"
+gdb_continue_to_breakpoint "first HUP"
+gdb_test "continue" "Catchpoint .*"
-set test "continue to the handler"
-gdb_test_multiple "continue" $test {
- -re "Breakpoint \[0-9\]+,\[^\r\n\]* pass .*\r\n$gdb_prompt $" {
- pass $test
- }
- -re "Breakpoint \[0-9\]+,\[^\r\n\]* fail .*\r\n$gdb_prompt $" {
- fail $test
- }
-}
+# Test interaction with fork.
+# This used to cause a gdb_assert in the code detaching the
+# breakpoints for the child.
+gdb_continue_to_breakpoint "fork loop"
+gdb_test "continue" "Catchpoint .* SIGHUP.*" "got SIGHUP after fork"
« no previous file with comments | « gdb/testsuite/gdb.base/catch-signal-fork.c ('k') | gdb/testsuite/gdb.base/catch-syscall.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698