RFA: Skip largefile PCH test on Solaris 10 x86

Mark Mitchell mark@codesourcery.com
Mon May 7 18:38:00 GMT 2007


As detailed in PR 14940, PCH on Solaris 10 x86 doesn't work very well:
there doesn't seem to be any way to get consistent addresses from
mmap.  Small PCH tests work, but big ones don't.  In practice, PCH is
probably not useful on this platform, but I'm not sure if we have a
good way to totally disable it.

In any case, in the interest of testsuite cleanliness, I'd like to
apply this patch, which skips largefile on Solaris 10 x86.
Technically, we should be XFAILing, not skipping, but I don't see a
good way to do this.  Janis, do you?  If not, is this patch OK?

Thanks,

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

2007-05-07  Mark Mitchell  <mark@codesourcery.com>

	* gcc.dg/pch/pch.exp: Skip largefile on Solaris 10 x86.

Index: gcc.dg/pch/pch.exp
===================================================================
--- gcc.dg/pch/pch.exp	(revision 124476)
+++ gcc.dg/pch/pch.exp	(working copy)
@@ -37,20 +37,24 @@ foreach test [lsort [glob -nocomplain $s
     dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"
 }
 
-set test "largefile.c"
-set testh "largefile.hs"
-set f [open $test w]
-set v 0
-for { set v 0 } { $v < 10000 } { incr v } {
-    puts $f "#define MACRO_${v} \"1234567890\" \"$v\""
+# On Solaris 2, mmap does not return consistent addresses across
+# invocations.  See PR 14940.
+if { ! [istarget "i?86-*-solaris2.10" ] } {
+    set test "largefile.c"
+    set testh "largefile.hs"
+    set f [open $test w]
+    set v 0
+    for { set v 0 } { $v < 10000 } { incr v } {
+	puts $f "#define MACRO_${v} \"1234567890\" \"$v\""
+    }
+    puts $f "#include \"largefile.h\""
+    close $f
+    set f [open $testh w]
+    close $f
+    dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"    
+    file delete $test
+    file delete $testh
 }
-puts $f "#include \"largefile.h\""
-close $f
-set f [open $testh w]
-close $f
-dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"    
-file delete $test
-file delete $testh
 
 set dg-do-what-default "$old_dg_do_what_default"
 



More information about the Gcc-patches mailing list