Since the testsuite parallelism has been massively increased some time ago, I'm seing lots of timeouts on slower SPARC hardware (1.2 Ghz UltraSPARC-T2). Closer investigation revealed that this happens on Solaris everywhere, though not so badly that the testsuite 300 second timeout hits. The check_guality test in gcc.dg/guality and g++.dg/guality times out every time.
It turns out that while the gfortran.dg/guality test do run, the gcc.dg and g++.dg ones don't. Running check_guality under truss shows that gdb complains No symbol table is loaded. Use the "file" command. and loops from there, unlike gfortran.dg where the command name is passed to gdb. No idea why this doesn't happen on Linux, but the problem is easily cured by adding the command name (which is the actual executable gdb tries to attach to) to the gdb command line. This makes the guality tests run sucessfully on Solaris, even on the slow T2 box. However, the guality tests show dozens or even hundreds of FAILs and/or XPASSes, adding insane amounts of noise to the testsuite results, which nobody seems to be looking into. So I wonder what the best course of action is here: one might consider running them only when a GCC_TEST_RUN_GUALITY environment variable is set, but skip them by default until someone acutally interested in improving results here shows up. Thoughts? Anyway, here's the patch I've used. Ok for mainline? Rainer 2015-01-28 Rainer Orth <r...@cebitec.uni-bielefeld.de> gcc/testsuite: * gcc.dg/guality/guality.h (main): Add argv[0] to guality_gdb_command.
# HG changeset patch # Parent 26a271b29df9b72e6fbdb554a6a8b5e00d94e5ee Skip guality tests on Solaris diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp --- a/gcc/testsuite/g++.dg/guality/guality.exp +++ b/gcc/testsuite/g++.dg/guality/guality.exp @@ -5,7 +5,7 @@ load_lib gcc-gdb-test.exp # Disable on darwin until radr://7264615 is resolved. if { [istarget *-*-darwin*] } { - return + return } if { [istarget "powerpc-ibm-aix*"] } { diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp --- a/gcc/testsuite/gcc.dg/guality/guality.exp +++ b/gcc/testsuite/gcc.dg/guality/guality.exp @@ -5,7 +5,7 @@ load_lib gcc-gdb-test.exp # Disable on darwin until radr://7264615 is resolved. if { [istarget *-*-darwin*] } { - return + return } if { [istarget "powerpc-ibm-aix*"] } { diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h --- a/gcc/testsuite/gcc.dg/guality/guality.h +++ b/gcc/testsuite/gcc.dg/guality/guality.h @@ -228,6 +228,16 @@ main (int argc, char *argv[]) } } + if (argv[0]) + { + int len = strlen (guality_gdb_command) + 1 + strlen (argv[0]); + char *buf = (char *) __builtin_alloca (len); + strcpy (buf, guality_gdb_command); + strcat (buf, " "); + strcat (buf, argv[0]); + guality_gdb_command = buf; + } + for (i = 1; i < argc; i++) if (strcmp (argv[i], "--guality-skip") == 0) guality_skip = 1;
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University