This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix broken dg-skip-if in two gcc.target/i386 testcases


Reviewing the failing Solaris 11/x86 testcases, I came across

FAIL: gcc.target/i386/pr32000-2.c (test for excess errors)
WARNING: gcc.target/i386/pr32000-2.c compilation failed to produce executable
FAIL: gcc.target/i386/stackalign/return-3.c (test for excess errors)

That the testcases were run at all was strange, since they were both
guarded with

/* { dg-skip-if "" { ! { ilp32 && dfp } } } */

Since Solaris 2 has no dfp support, they should have been skipped.  It
took me quite some time digging into the DejaGnu code (adding lots of
debug code to lib/target-supports-dg.exp) until I found out what's going
on: after dg-skip-if has determined that the selector (i.e. the target
and effective target expression which is its second arg) matches, it
only allows the testcase to be skipped if the compilation flags used
match its third arg (include), which is mandatory, but was missing in
those two cases.  Adding it allowed both testcases to be skipped as they
should have been.

Perhaps DejaGnu's framework.exp (check_conditional_xfail) should warn if
the include arg is missing, since it is required?

This is just another case where I've been bitten by the sorry state of
documentation for our DejaGnu test framework: it would really help to
have this stuff in one place in the internals manual instead of
scattered over READMEs, the WiKi, and the code.  I fear this would have
to be done by someone who really knows the framework, though, since
rediscovering all the quirks and corner cases of the testsuite for
anyone else is bound to be a nightmare.

Ok for mainline?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2010-02-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.target/i386/pr32000-2.c: Add missing include and exclude
	lists to dg-skip-if.
	* gcc.target/i386/stackalign/return-3.c: Likewise.

diff -r e55e5c35cd28 -r 0e0663481abb gcc/testsuite/gcc.target/i386/pr32000-2.c
--- a/gcc/testsuite/gcc.target/i386/pr32000-2.c	Wed Feb 10 21:06:22 2010 +0100
+++ b/gcc/testsuite/gcc.target/i386/pr32000-2.c	Wed Feb 10 21:06:23 2010 +0100
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-skip-if "" { ! { ilp32 && dfp } } } */
+/* { dg-skip-if "" { ! { ilp32 && dfp } } { "*" } { "" } } */
 /* { dg-options "-O -msse2 -std=gnu99 -mpreferred-stack-boundary=2" } */
 
 #include "sse2-check.h"
diff -r e55e5c35cd28 -r 0e0663481abb gcc/testsuite/gcc.target/i386/stackalign/return-3.c
--- a/gcc/testsuite/gcc.target/i386/stackalign/return-3.c	Wed Feb 10 21:06:22 2010 +0100
+++ b/gcc/testsuite/gcc.target/i386/stackalign/return-3.c	Wed Feb 10 21:06:23 2010 +0100
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-skip-if "" { ! { ilp32 && dfp } } } */
+/* { dg-skip-if "" { ! { ilp32 && dfp } } { "*" } { "" } } */
 /* { dg-options "-msse -std=gnu99 -mpreferred-stack-boundary=2" } */
 
 /* This compile only test is to detect an assertion failure in stack branch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]