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

Unified Diff: gdb/testsuite/gdb.threads/create-fail.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.threads/create-fail.c ('k') | gdb/testsuite/gdb.threads/current-lwp-dead.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.threads/create-fail.exp
diff --git a/gdb/testsuite/gdb.threads/create-fail.exp b/gdb/testsuite/gdb.threads/create-fail.exp
new file mode 100644
index 0000000000000000000000000000000000000000..aaee7339be05cc97f0c52f5233e584cec05f64c0
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/create-fail.exp
@@ -0,0 +1,53 @@
+# Copyright (C) 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
+# 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/>.
+
+# On GNU/Linux, a creating a thread bound to an unexisting cpu spawns
+# the clone child thread for a bit, which is then immediately
+# cancelled. The spawned child may trigger a dlopen (for libgcc_s)
+# while being cancelled, which results in a trap being reported to
+# GDB, for a thread that libthread_db considers to be TD_THR_ZOMBIE.
+# Make sure we handle that scenario properly.
+
+standard_testfile
+set executable ${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
+}
+
+set iterations 10
+for {set i 1} {$i <= $iterations} {incr i} {
+ with_test_prefix "iteration $i" {
+
+ clean_restart ${executable}
+
+ if ![runto_main] {
+ return -1
+ }
+
+ set test "run till end"
+ gdb_test_multiple "continue" "$test" {
+ -re "exited with code 01.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "exited with code 02.*$gdb_prompt $" {
+ unsupported "$test (too many CPUs for test?)"
+ }
+ -re "exited normally.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+ }
+}
« no previous file with comments | « gdb/testsuite/gdb.threads/create-fail.c ('k') | gdb/testsuite/gdb.threads/current-lwp-dead.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698