Hi Iain,

> Having a look, actually I can just use the presence of TEST_OUTPUT to be
> a gate for whether to prune all output or not.

that's quite nice indeed.

> Maybe this can be improved later to extract the contents of TEST_OUTPUT,
> but for now, it has caught a few hidden bugs in the tests that I have
> handled in the patch below (no changelog entry yet).

I've tried the patch myself last night on both i386-pc-solaris2.11 (both
with as and gas) and sparc-sun-solaris2.11 (gas only until PR d/98584 is
fixed) and found a few issues:

> +proc gdc-extra-test-options { fdout test } {
> +    switch $test {
[...]
> +     "runnable/test42.d" {
> +         # Tests that overflow line limits of older assemblers.
> +         puts $fdout "// { dg-xfail-if \"Lines exceed 10240 characters\" { 
> *-*-solaris2.* && { ! gas } } }"

This doesn't work: I get

+XPASS: gdc.test/runnable/test42.d   (test for excess errors)
+UNRESOLVED: gdc.test/runnable/test42.d   compilation failed to produce 
executable
+XPASS: gdc.test/runnable/test42.d -shared-libphobos   (test for excess errors)
+UNRESOLVED: gdc.test/runnable/test42.d -shared-libphobos   compilation failed 
to produce executable

which is no wonder: due to the presence of TEST_OUTPUT in the test, all
output gets pruned, including the assembler message.  This leads to

success
myInt int
myBool bool
i
s
C6test42__T4T219TiZ1C
C6test427test219FZ8__mixin11C
Input string too long, limit 10240
compiler exited with status 1
XPASS: gdc.test/runnable/test42.d   (test for excess errors)

Unfortunately the exit status of compiler and assembler is ignored by
the testsuite framework when deciding whether the compilation has
succeeded.

Besides, the dg-xfail-if above should be restricted to *86*-*-solaris2.*
&& ! gas (to allow for both i?86-*-solaris2.* and x86_64-*-solaris2.*):
I've previously run a Solaris/SPARC build with as and libphobos enabled
and only the 64-bit gdc.test/runnable/test42.d execution tests FAIL.
While the Solaris sparc and x86 assemblers have a common origin, the
code bases have diverged over time and the sparc assembler doesn't have
this particular low limit.

However, testing on Solaris/SPARC with gas and libphobos showed another
issue:

+FAIL: gdc.test/runnable/traits_getPointerBitmap.d   (test for excess errors)
 UNRESOLVED: gdc.test/runnable/traits_getPointerBitmap.d   compilation failed 
to produce executable
+FAIL: gdc.test/runnable/traits_getPointerBitmap.d -shared-libphobos   (test 
for excess errors)
 UNRESOLVED: gdc.test/runnable/traits_getPointerBitmap.d -shared-libphobos   
compilation failed to produce executable

Excess errors:
runnable/traits_getPointerBitmap.d:220:9: error: vector type __vector(float[4]) 
is not supported on this platform

        Rainer

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

Reply via email to