Merge testsuite ERROR fixes from HEAD.
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 7136cc2..d93fd4c 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,14 @@
+2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	gdb/testsuite/:
+	* gdb.base/store.exp: Don't use gdb_suppress_entire_file.
+	* gdb.base/gdb1555.exp: Use gdb_compile_shlib.  Skip if not
+	native.
+	* gdb.stabs/exclfwd.exp: Skip the test if configure did not
+	enable stabs testing.
+	* gdb.base/auxv.exp: Intercept undefined command messages before
+	gdb_test_multiple does.
+
 2006-06-19  Nathan Sidwell  <nathan@codesourcery.com>
 
 	* gdb/testsuite/
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
index 5187dd9..dd43d85 100644
--- a/gdb/testsuite/gdb.base/auxv.exp
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -139,6 +139,9 @@
     -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
 	unsupported "gcore"
     }
+    -re "Undefined command: .*\[\r\n\]+$gdb_prompt $" {
+	unsupported "gcore"
+    }
 }
 
 # Let the program continue and die.
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
index 8bea632..f7cfe75 100644
--- a/gdb/testsuite/gdb.base/gdb1555.exp
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -30,59 +30,29 @@
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
+set libsrc "${srcdir}/${subdir}/${libfile}.c"
+set libobj "${objdir}/${subdir}/${libfile}.so"
+set execsrc "${srcdir}/${subdir}/${srcfile}"
+
 remote_exec build "rm -f ${binfile}"
 
+# Are we on a target board?  No support for downloading shared libraries
+# to a target yet.
+if ![isnative] then {
+    return 0
+}
+
 # get the value of gcc_compiled
 if [get_compiler_info ${binfile}] {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } {
+if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
+     || [gdb_compile $execsrc ${binfile} executable \
+	     [list debug shlib=${libobj}]] != "" } {
     return -1
 }
 
-# Build the shared libraries this test case needs.
-#
-
-if {$gcc_compiled == 0} {
-    if [istarget "hppa*-hp-hpux*"] then {
-        set additional_flags "additional_flags=+z"
-    } elseif { [istarget "mips-sgi-irix*"] } {
-        # Disable SGI compiler's implicit -Dsgi
-        set additional_flags "additional_flags=-Usgi"
-    } else {
-        # don't know what the compiler is...
-        set additional_flags ""
-    }
-} else {
-    if { ([istarget "powerpc*-*-aix*"]
-    || [istarget "rs6000*-*-aix*"]) } {
-        set additional_flags ""
-    } else {
-        set additional_flags "additional_flags=-fpic"
-    }
-}
-
-set additional_flags "$additional_flags -shared"
-if {[gdb_compile "${srcdir}/${subdir}/${libfile}.c" "${objdir}/${subdir}/${libfile}.so" executable [list debug $additional_flags "incdir=${objdir}"]] != ""} {
-    return -1
-}
-
-if { ($gcc_compiled 
-&&  ([istarget "powerpc*-*-aix*"]
-|| [istarget "rs6000*-*-aix*"] )) } {
-    set additional_flags "additional_flags=-L${objdir}/${subdir}"
-} elseif { [istarget "mips-sgi-irix*"] } {
-    set additional_flags "additional_flags=-rpath ${objdir}/${subdir}"
-} else {
-    set additional_flags ""
-}
-
-if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.so" "${binfile}" executable [list debug $additional_flags]] != ""} {
-    return -1
-}
-
-
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index 7b92eca..82bcb0d 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.exp
@@ -30,7 +30,8 @@
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+    untested store.exp
+    return -1
 }
 
 if [get_compiler_info ${binfile}] {
diff --git a/gdb/testsuite/gdb.stabs/exclfwd.exp b/gdb/testsuite/gdb.stabs/exclfwd.exp
index 05ab97c..9d50014 100644
--- a/gdb/testsuite/gdb.stabs/exclfwd.exp
+++ b/gdb/testsuite/gdb.stabs/exclfwd.exp
@@ -21,6 +21,12 @@
     strace $tracelevel
 }
 
+# If the test directory was not created by configure then skip
+# this test.
+if ![file isdirectory ${objdir}/${subdir}] then {
+    return 0
+}
+
 #
 # test running programs
 #