testsuite exp programming issue

Mike Stump mrs@apple.com
Thu Oct 5 01:06:00 GMT 2006


On Oct 3, 2006, at 9:30 PM, Jack Howarth wrote:
> I think I have this puzzled out now. The correct patch is...
>
> Index: lib/obj-c++.exp
> ===================================================================
> --- lib/obj-c++.exp     (revision 117423)
> +++ lib/obj-c++.exp     (working copy)
> @@ -282,8 +282,16 @@ proc obj-c++_target_compile { source des

> +       lappend options "libs=-lobjc-gnu"

Why do this, given:

$ gcc -fgnu-runtime -m64  t.m -lobjc -v
  /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/collect2 -dynamic -arch  
ppc64 -macosx_version_min 10.3 -multiply_defined suppress - 
weak_reference_mismatches non-weak -o a.out -lcrt1.o /usr/lib/gcc/ 
powerpc-apple-darwin8/4.0.1/ppc64/crt3.o -L/usr/lib/gcc/powerpc-apple- 
darwin8/4.0.1/ppc64 -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1 -L/usr/ 
lib/gcc/powerpc-apple-darwin8/4.0.1/ppc64 -L/usr/lib/gcc/powerpc-apple- 
darwin8/4.0.1 -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../.. /var/ 
tmp//ccWJWuP8.o -lobjc-gnu -lgcc_s.10.4 -lgcc -lSystemStubs -lSystem

?


> +       lappend options "libs=-fgnu-runtime"


> Note that the placement of -fgnu-runtime on the libs
> flags is by design. Otherwise for those tests that
> null out the compiler flags, the -fgnu-runtime flag
> is lost.

Did you try:

   lappend options "additional_flags=-fgnu-runtime"

?  If not, try that.

Ah, I see Andrew has commented, his suggestion is reasonable, it is  
better to do this in the compiler.

> # of unexpected failures        43

On darwin9, I get:

mrs $ make RUNTESTFLAGS="--target_board=unix'{-m64}{,-fgnu-runtime}'"  
check-objctest -d testsuite || mkdir testsuite
test -d testsuite/objc || mkdir testsuite/objc
(rootme=`${PWDCMD-pwd}`; export rootme; \
         srcdir=`cd ../../gcc/gcc; ${PWDCMD-pwd}` ; export srcdir ; \
         cd testsuite/objc; \
         rm -f tmp-site.exp; \
         sed '/set tmpdir/ s|testsuite|testsuite/objc|' \
                 < ../../site.exp > tmp-site.exp; \
         /bin/sh ${srcdir}/../move-if-change tmp-site.exp site.exp; \
         EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo $ 
{rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
         if [ -f ${rootme}/../expect/expect ] ; then  \
            TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; $ 
{PWDCMD-pwd}` ; \
             export TCL_LIBRARY ; fi ; \
         `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo $ 
{srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool objc -- 
target_board=unix'{-m64}{,-fgnu-runtime}')
WARNING: Couldn't find the global config file.
Test Run By mstump on Wed Oct  4 17:31:20 2006
Native configuration is powerpc-apple-darwin9.0.0d1

                 === objc tests ===

Schedule of variations:
     unix/-m64
     unix/-m64/-fgnu-runtime

Running target unix/-m64
Using /Volumes/mrs3/Packages/dejagnu/baseboards/unix.exp as board  
description file for target.
Using /Volumes/mrs3/Packages/dejagnu/config/unix.exp as generic  
interface file for target.
Using /Volumes/mrs3/net/gcc/gcc/testsuite/config/default.exp as tool- 
and-target-specific interface file.
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc/compile/compile.exp ...
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc/execute/exceptions/ 
exceptions.exp ...
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc/execute/execute.exp ...
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc.dg/dg.exp ...
FAIL: objc.dg/const-str-10.m scan-assembler .long 
\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data
FAIL: objc.dg/const-str-11.m scan-assembler .long\t__XStrClassReference 
\n\t.long\t.*\n\t.long\t5\n\t.data
FAIL: objc.dg/const-str-9.m scan-assembler .long 
\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data
FAIL: objc.dg/encode-8.m execution test
FAIL: objc.dg/next-runtime-1.m scan-assembler L_OBJC_MODULES: 
\n[ \t]*.long\t6\n
FAIL: objc.dg/no-extra-load.m (test for excess errors)
ERROR: objc.dg/no-extra-load.m: error executing dg-final: couldn't  
open "no-extra-load.s": no such file or directory
FAIL: objc.dg/stret-2.m scan-assembler objc_msgSend_stret
FAIL: objc.dg/stret-2.m scan-assembler objc_msgSendSuper_stret
FAIL: objc.dg/stret-2.m scan-assembler-not objc_msgSend[^_S]
FAIL: objc.dg/stret-2.m scan-assembler-not objc_msgSendSuper[^_]
FAIL: objc.dg/symtab-1.m scan-assembler L_OBJC_SYMBOLS.*:\n\t.long\t0\n 
\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived.*\n 
\t.long\tL_OBJC_CLASS_Base.*\n
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc.dg/gnu-encoding/gnu- 
encoding.exp ...
FAIL: objc.dg-struct-layout-encoding-1/t001_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t002_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t003_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t004_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t005_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t006_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t007_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t008_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t009_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t010_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t011_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t012_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t013_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t014_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t015_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t016_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t017_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t018_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t019_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t020_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t021_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t022_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t023_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t024_main.m execution test
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc.dg/special/ 
special.exp ...
FAIL: objc.dg/special/unclaimed-category-1.m unclaimed-category-1a.o  
(test for excess errors)

                 === objc Summary for unix/-m64 ===

# of expected passes            2950
# of unexpected failures        36
# of expected failures          7
# of unresolved testcases       1
# of unsupported tests          2
Running target unix/-m64/-fgnu-runtime
Using /Volumes/mrs3/Packages/dejagnu/baseboards/unix.exp as board  
description file for target.
Using /Volumes/mrs3/Packages/dejagnu/config/unix.exp as generic  
interface file for target.
Using /Volumes/mrs3/net/gcc/gcc/testsuite/config/default.exp as tool- 
and-target-specific interface file.
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc/compile/compile.exp ...
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc/execute/exceptions/ 
exceptions.exp ...
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc/execute/execute.exp ...
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc.dg/dg.exp ...
FAIL: objc.dg/bitfield-2.m execution test
FAIL: objc.dg/const-str-10.m (test for excess errors)
ERROR: objc.dg/const-str-10.m: error executing dg-final: couldn't open  
"const-str-10.s": no such file or directory
FAIL: objc.dg/const-str-11.m scan-assembler .long\t__XStrClassReference 
\n\t.long\t.*\n\t.long\t5\n\t.data
FAIL: objc.dg/const-str-3.m (test for excess errors)
WARNING: objc.dg/const-str-3.m compilation failed to produce executable
FAIL: objc.dg/const-str-9.m (test for excess errors)
ERROR: objc.dg/const-str-9.m: error executing dg-final: couldn't open  
"const-str-9.s": no such file or directory
FAIL: objc.dg/encode-1.m execution test
FAIL: objc.dg/encode-8.m execution test
FAIL: objc.dg/image-info.m (test for excess errors)
ERROR: objc.dg/image-info.m: error executing dg-final: couldn't open  
"image-info.s": no such file or directory
FAIL: objc.dg/isa-field-1.m (test for excess errors)
FAIL: objc.dg/lookup-1.m (test for excess errors)
FAIL: objc.dg/method-4.m scan-assembler _OBJC_CLASS_REFERENCES_0
FAIL: objc.dg/next-runtime-1.m scan-assembler L_OBJC_MODULES: 
\n[ \t]*.long\t6\n
FAIL: objc.dg/no-extra-load.m (test for excess errors)
ERROR: objc.dg/no-extra-load.m: error executing dg-final: couldn't  
open "no-extra-load.s": no such file or directory
FAIL: objc.dg/objc-gc-4.m (internal compiler error)
FAIL: objc.dg/objc-gc-4.m (test for excess errors)
FAIL: objc.dg/selector-1.m  (test for warnings, line 22)
FAIL: objc.dg/selector-1.m (test for excess errors)
FAIL: objc.dg/stret-2.m scan-assembler objc_msgSend_stret
FAIL: objc.dg/stret-2.m scan-assembler objc_msgSendSuper_stret
FAIL: objc.dg/symtab-1.m scan-assembler L_OBJC_SYMBOLS.*:\n\t.long\t0\n 
\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived.*\n 
\t.long\tL_OBJC_CLASS_Base.*\n
FAIL: objc.dg/zero-link-1.m scan-assembler objc_getClass
FAIL: objc.dg/zero-link-2.m scan-assembler _OBJC_CLASS_REFERENCES_0
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc.dg/gnu-encoding/gnu- 
encoding.exp ...
FAIL: objc.dg-struct-layout-encoding-1/t001_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t002_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t003_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t004_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t005_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t006_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t007_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t008_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t009_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t010_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t011_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t012_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t013_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t014_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t015_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t016_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t017_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t018_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t019_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t020_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t021_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t022_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t023_main.m execution test
FAIL: objc.dg-struct-layout-encoding-1/t024_main.m execution test
Running /Volumes/mrs3/net/gcc/gcc/testsuite/objc.dg/special/ 
special.exp ...

                 === objc Summary for unix/-m64/-fgnu-runtime ===

# of expected passes            1759
# of unexpected failures        46
# of expected failures          7
# of unresolved testcases       4
# of unsupported tests          2

                 === objc Summary ===

# of expected passes            4709
# of unexpected failures        82
# of expected failures          14
# of unresolved testcases       5
# of unsupported tests          4
/Volumes/mrs3/net/gcc-darwin/gcc/xgcc  version 4.2.0 20060929  
(experimental)

make: [check-objc] Error 1 (ignored)

on an unmodified tree, if you're curious.



More information about the Gcc mailing list