From db186b3db73d66a2abe4f428e69c5aa8f366db68 Mon Sep 17 00:00:00 2001
From: Fred Fish <fnf@specifix.com>
Date: Mon, 7 Aug 1995 07:20:02 +0000
Subject: [PATCH] 	* gdb.base/corefile.exp:  Change xfail for backtrace
 in 	corefile.exp from linuxaout to all linux. 	* gdb.base/sigall.exp
 (test_one_sig):  Specifically deal with 	cases where we miss the
 breakpoint at the signal handler 	for some reason.  Setup xfail for
 linuxoldld/linuxaout and 	getting SIGIO.  Setup xfail for
 linuxoldld/linuxaout for 	hitting SIGURG breakpoint. 	*
 gdb.base/signals.exp:  Setup xfail for "next" acting like 	continue to
 add linuxoldld.  Setup xfail for all linux for 	"next to handler in
 signals_tests_1", "backtrace in 	signals_tests_1", "continue to func1",
 "pass SIGUSR1", 	and continue to handler".

---
 gdb/testsuite/ChangeLog             | 19 +++++++++++++++++++
 gdb/testsuite/gdb.base/corefile.exp | 15 ++++++++++++---
 gdb/testsuite/gdb.base/signals.exp  | 10 ++++++++++
 3 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9d660f25826..150b8955f58 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,22 @@
+Sun Aug  6 16:52:29 1995  Fred Fish  <fnf@cygnus.com>
+
+	* gdb.base/corefile.exp:  Change xfail for backtrace in
+	corefile.exp from linuxaout to all linux.
+	* gdb.base/sigall.exp (test_one_sig):  Specifically deal with
+	cases where we miss the breakpoint at the signal handler
+	for some reason.  Setup xfail for linuxoldld/linuxaout and
+	getting SIGIO.  Setup xfail for linuxoldld/linuxaout for
+	hitting SIGURG breakpoint.
+	* gdb.base/signals.exp:  Setup xfail for "next" acting like
+	continue to add linuxoldld.  Setup xfail for all linux for
+	"next to handler in signals_tests_1", "backtrace in
+	signals_tests_1", "continue to func1", "pass SIGUSR1",
+	and continue to handler".
+
+Thu Aug  3 10:45:37 1995  Fred Fish  <fnf@cygnus.com>
+
+	* Update all FSF addresses except those in COPYING* files.
+
 Sun Jul 30 17:50:35 1995  Fred Fish  <fnf@cygnus.com>
 
 	* gdb.base/a2-run.exp: Change messages to be more explicit about
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index 58de09c0dab..66e3edde2df 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -12,7 +12,7 @@
 # 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@prep.ai.mit.edu
@@ -28,7 +28,6 @@ set bug_id 0
 
 # are we on a target board
 if ![isnative] then {
-    warning "corefile test case can't run on a target system"
     return
 }
 
@@ -56,6 +55,9 @@ if ![file exists $objdir/$subdir/corefile] then {
 	catch "exec mv $objdir/$subdir/core.$binfile $objdir/$subdir/corefile"
     } elseif [file exists $objdir/$subdir/$binfile.core] {
 	catch "exec mv $objdir/$subdir/$binfile.core $objdir/$subdir/corefile"
+    } else {
+	warning "can't generate a core file - core tests suppressed - check ulimit -c"
+	return 0
     }
 }
 
@@ -136,10 +138,17 @@ $prompt $"			{ pass "core-file command" }
 	timeout 		{ fail "(timeout) core-file command" }
 }
 
+# Somehow we better test the ability to read the registers out of the core
+# file correctly.  I don't think the other tests do this.
+
+# Haven't investigated this xfail
+setup_xfail "m68k-*-hpux*" "i*86-*-linux*"
+gdb_test "bt" "abort.*func2.*func1.*main.*" "backtrace in corefile.exp"
+
 # test reinit_frame_cache
 
 gdb_load $objdir/$subdir/$binfile
 setup_xfail "*-*-*"
-gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\)"
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\)" "up in corefile.exp"
 
 gdb_test "core" "No core file now."
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index d7e831e3f0c..85ce15e9f45 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -38,6 +38,10 @@ proc signal_tests_1 {} {
 	setup_xfail "i*86-univel-sysv4*"
 	# lynx fails with "next" acting like "continue"
 	setup_xfail "*-*-*lynx*"
+	# linux (aout versions) also fails with "next" acting like "continue"
+	# this is probably more dependant on the kernel version than on the
+	# object file format or utils.  (sigh)
+	setup_xfail "i*86-*-linuxaout" "i*86-*-linuxoldld"
 	send "next\n"
 	expect {
 	    -re "alarm .*$prompt $" { pass "next to 2nd alarm (1)" }
@@ -104,6 +108,7 @@ proc signal_tests_1 {} {
 
 	set bash_bug 0
 	send "next\n"
+	setup_xfail "i*86-*-linux"
 	expect {
 	    -re "Breakpoint.*handler.*$prompt $" {
 		pass "next to handler in signals_tests_1"
@@ -123,6 +128,7 @@ proc signal_tests_1 {} {
 	# This doesn't test that main is frame #2, just that main is frame
 	# #2, #3, or higher.  At some point this should be fixed (but
 	# it quite possibly would introduce new FAILs on some systems).
+	setup_xfail "i*86-*-linux"
 	gdb_test "backtrace" "#0.*handler.*#1.*#2.*main.*" \
 	    "backtrace in signals_tests_1"
 
@@ -133,6 +139,7 @@ proc signal_tests_1 {} {
 	# a SIGTRAP, but with different symptoms.
 	setup_xfail "vax-*-ultrix*"
 	setup_xfail "i*86-*-bsd*"
+	setup_xfail "i*86-*-linux"
 	send "continue\n"
 	expect {
 	    -re "Breakpoint.*func1.*$prompt $" { pass "continue to func1" }
@@ -163,6 +170,7 @@ proc signal_tests_1 {} {
 	}
 
 	setup_xfail "*-*-irix*"
+	setup_xfail "i*86-*-linux"
 	send "signal SIGUSR1\n"
 	expect {
 	    -re "Breakpoint.*handler.*$prompt $" { pass "signal SIGUSR1" }
@@ -217,6 +225,7 @@ proc signal_tests_1 {} {
 	    setup_xfail "m68*-*-sunos4*"
 	}
 
+	setup_xfail "i*86-*-linux"
 	gdb_test "continue" "Breakpoint.*handler.*" "continue to handler"
 
 	# If the NO_SINGLE_STEP failure happened, we have already exited.
@@ -258,6 +267,7 @@ if {[ istarget "m68*-motorola-*" ] || [ istarget "hppa*-*-bsd*" ] ||
 if [ istarget "*-*-*lynx*" ] then {
   setup_xfail "*-*-*"
   fail "kernel scroggs stack pointer in signal tests on this target"
+  return 0
 }
 
 gdb_exit