aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-10-13 16:30:45 +0000
committerDaniel Jacobowitz <drow@false.org>2003-10-13 16:30:45 +0000
commit7d605576a6ff0e9986a68e98b0a1893ce30e1f32 (patch)
tree19a6f5b23f0f02e8e370729aa8d4932b732c29a1
parent64386c31df79fa199254c3099a9ca70b9bd2839e (diff)
downloadgdb-7d605576a6ff0e9986a68e98b0a1893ce30e1f32.zip
gdb-7d605576a6ff0e9986a68e98b0a1893ce30e1f32.tar.gz
gdb-7d605576a6ff0e9986a68e98b0a1893ce30e1f32.tar.bz2
* gdb.base/gcore.exp: Issue an UNSUPPORTED and exit if we can't
create a core file. * gdb.threads/gcore-thread.exp: Likewise.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/gcore.exp24
-rw-r--r--gdb/testsuite/gdb.threads/gcore-thread.exp22
3 files changed, 45 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 4807d7f..c22d93e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/gcore.exp: Issue an UNSUPPORTED and exit if we can't
+ create a core file.
+ * gdb.threads/gcore-thread.exp: Likewise.
+
2003-10-13 Corinna Vinschen <vinschen@redhat.com>
* gdb.base/call-rt-st.c (struct bit_flags_char_t): New bitfield
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 8c0ae8e..0576638 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -1,4 +1,4 @@
-# Copyright 2002 Free Software Foundation, Inc.
+# Copyright 2002, 2003 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
@@ -106,9 +106,25 @@ set pre_corefile_extern_array \
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
-gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
- "Saved corefile ${escapedfilename}" \
- "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -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
+}
# Now restart gdb and load the corefile.
gdb_exit
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index 5cb80bd..40c9ada 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
@@ -105,9 +105,25 @@ gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running"
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
# Drop corefile
-gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
- "Saved corefile ${escapedfilename}" \
- "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -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
+}
# Now restart gdb and load the corefile.
gdb_exit