This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFA:] work around dejagnu bug for simulator targets
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Tue, 5 Feb 2008 13:40:02 +0100
- Subject: [RFA:] work around dejagnu bug for simulator targets
There was a weird discrepancy between cris-elf libstdc++
testsuite runs on Debian systems and Fedora systems, with 59
extra failures on Fedora systems. After some digging, I found
it was due to a bugfix imported into the debian dejagnu package
but missing in the Fedora package and pristine dejagnu-1.4.4:
<http://lists.gnu.org/archive/html/dejagnu/2004-06/msg00008.html>.
The bug caused input files to be missing, which trigged aborts
in the test-cases, looking like "real" failures. (Meh, not
really graceful exit behavior there, but once you know the
reason, I guess you just fix it and/or don't care.)
There are signs that there'll be a dejagnu-1.5 release perhaps
this year (just trying to curb your enthusiasm), but I guess
we'll have to support dejagnu-1.4.4 for some time after that.
This patch, the file dejapatches.exp, also tries to establish a
general habitat for current and future gcc-local bugfixes and
overrides (grep for 'delete.*after next [Dd]eja[Gg]nu release'
in gcc/testsuite/lib and you might see a need). As this is
currently only needed for libstdc++, I didn't touch the other
config/default.exp's.
I tested this against Debian etch, making sure the installed
sim_download was used and on Fedora 8, making sure the fallback
was used. Both setups now exhibit the same results for
libstdc++-v3.
Incidentally, v3-copy-files should use remote_upload (to
target), not remote_download (from target). You almost can't
tell the difference, though. :)
Ok to commit?
:ADDPATCH testsuite:
gcc/testsuite:
* lib/dejapatches.exp: New file.
libstdc++:
* testsuite/config/default.exp: Load gcc dejapatches.exp.
--- /dev/null 2008-01-22 19:09:36.820000250 +0100
+++ gcc/testsuite/lib/dejapatches.exp 2008-02-05 12:16:40.000000000 +0100
@@ -0,0 +1,35 @@
+# Copyright (C) 2008 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 GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Necessary procs and fallbacks for functionality not present in
+# pristine dejagnu-1.4.4. Make sure overrides here work with updated
+# dejagnu too.
+
+# The absence of sim_download will cause e.g. the libstdc++ testsuite
+# to expose about 59 more FAILs on simulator targets supporting
+# fileio.
+
+if { [info procs sim_download] == "" } {
+ proc sim_download { dest file args } {
+ return [remote_download host $file $args]
+ }
+}
+
+if { [info procs sim_upload] == "" } {
+ proc sim_upload { dest srcfile args } {
+ return [remote_upload host $srcfile $args]
+ }
+}
Index: libstdc++-v3/testsuite/config/default.exp
===================================================================
--- libstdc++-v3/testsuite/config/default.exp (revision 132071)
+++ libstdc++-v3/testsuite/config/default.exp (working copy)
@@ -31,3 +31,6 @@
v3_target_compile $srcfile $destfile $compile_type $options
}
+# Support for old dejagnu. Must be loaded here, not in libstdc++.exp, to
+# make sure all existing procs are loaded when their presence is tested.
+load_file $srcdir/../../gcc/testsuite/lib/dejapatches.exp