This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 23 Jun 2010 15:59:09 +0200
- Subject: [RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp
I get a tcl error on gdb.threads/gcore-thread.exp
because cygwin fails before, and the program exits
earlier than expected.
When the test which is supposed
to set core_supported variable, no of the two variants is output,
but instead I get a message that I can't do this
without a running process.
gcore /usr/local/src/gdbcvs/build-norm/gdb/testsuite/gdb.threads/gcore.test
You can't do that without a process to debug.
This results in the fact that the core_supported variable is
not set, and the
if {!$core_supported}
issues a tcl ERROR.
The patch below, set core_supported to `0' before
testing for support at global level.
Tested on gcc16 (it works again, hurrah!)
no changes.
OK to commit?
Pierre Muller
Pascal language support maintainer for GDB
2010-06-23 Pierre Muller <muller@ics.u-strasbg.fr>
* gcore-thread.exp (core_supported): Initialize variable to zero
at global scope.
(gdb_test_multiple): Only set CORE_SUPPORTED if test passes.
Index: src/gdb/testsuite/gdb.threads/gcore-thread.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/gcore-thread.exp,v
retrieving revision 1.17
diff -u -p -r1.17 gcore-thread.exp
--- src/gdb/testsuite/gdb.threads/gcore-thread.exp 2 Jun 2010 19:58:21
-0000 1.17
+++ src/gdb/testsuite/gdb.threads/gcore-thread.exp 23 Jun 2010 13:16:20
-0000
@@ -94,6 +94,9 @@ gdb_test "continue" "Continuing.*Breakpo
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
# Drop corefile
+global core_supported
+set core_supported 0
+
gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
"save a corefile" \
{
@@ -104,12 +107,9 @@ gdb_test_multiple "gcore ${objdir}/${sub
}
-re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
unsupported "save a corefile"
- global core_supported
- set core_supported 0
}
}
-global core_supported
if {!$core_supported} {
return -1
}