This is the mail archive of the gcc-bugs@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]

[Bug testsuite/31928] New: Libjava testsuite not setting test environment parameters correctly.


I compiled gcc with java as one of the languages,
--enable-languages=...,java,...

$xgcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: /cygdrive/C/makecygwin/gcc-4_2-branch/configure --verbose
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --with-tune=athlon-xp
--prefix=/usr --enable-objc-gc --enable-concept-checks --disable-multilib
--exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/4.2 --enable-libstdcxx-debug
--enable-static --enable-shared --enable-initfini-array --enable-__cxa_atexit
--enable-threads=posix --enable-version-specific-runtime-libs --enable-libssp
--enable-libmudflap --enable-libgomp --disable-werror --enable-nls
--without-included-gettext --enable-decimal-float --with-long-double-128
--enable-debug --enable-java-gc=boehm --with-x --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --enable-java-awt=gtk,xlib --enable-gtk-cairo
--enable-qt-peer --enable-xmlj --enable-gconf-peer --enable-tool-wrappers
--enable-portable-native-sync --enable-libgcj-multifile --enable-libgcj
--with-stabs --enable-hash-synchronization --enable-gc-debug
--enable-interpreter --with-system-zlib --enable-libada --with-tls
--enable-win32-registry --with-cpu=athlon-xp --with-arch=athlon-xp
--disable-checking
Thread model: posix
gcc version 4.2.0 20070508 (prerelease)


Cygwin:
$ runtest --version
Expect version is       5.26
Tcl version is          8.4
Framework version is    1.4.2.x

Linux:
# runtest --version
Expect version is       5.43.0
Tcl version is          8.4
Framework version is    1.4.99


When I build this on the "i686-pc-linux-gnu" target the begining of the
libjava.log looks like this:

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /root/downloads/gcc-4_2-branch/libjava/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /root/downloads/gcc-4_2-branch/libjava/testsuite/libjava.cni/cni.exp
...
byte compile: /opt/gcc-4_2-build/gcc/gcj
-B/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/ -B/opt/gcc-4_2-build/gcc/
--encoding=UTF-8 -C
-I/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/testsuite/../libgcj-4.2.0.jar -g
/root/downloads/gcc-4_2-branch/libjava/testsuite/libjava.cni/PR9577.java -d
/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/testsuite 2>@ stdout
PASS: bytecompile
/root/downloads/gcc-4_2-branch/libjava/testsuite/libjava.cni/PR9577.java
PR9577 PASS: PR9577 header generation
Executing on host: /opt/gcc-4_2-build/gcc/xgcc -B/opt/gcc-4_2-build/gcc/  -I.
-I.. -I/root/downloads/gcc-4_2-branch/libjava/testsuite/.. -c  -o natPR9577.o
/root/downloads/gcc-4_2-branch/libjava/testsuite/libjava.cni/natPR9577.cc   
(timeout = 300)
PASS: natPR9577.cc compilation
set_ld_library_path_env_vars:
ld_library_path=.:/opt/gcc-4_2-build/i686-pc-linux-gnu/./libjava/.libs:/opt/gcc-4_2-build/gcc
Executing on host:
/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/testsuite/../libtool --silent
--tag=GCJ --mode=link /opt/gcc-4_2-build/gcc/gcj
-B/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/ -B/opt/gcc-4_2-build/gcc/
--encoding=UTF-8 -B/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/testsuite/../
/root/downloads/gcc-4_2-branch/libjava/testsuite/libjava.cni/PR9577.java
natPR9577.o   -no-install --main=PR9577 -g 
-L/opt/gcc-4_2-build/i686-pc-linux-gnu/./libjava/.libs -lm   -o PR9577   
(timeout = 300)
PASS: linking PR9577
set_ld_library_path_env_vars:
ld_library_path=.:/opt/gcc-4_2-build/i686-pc-linux-gnu/./libjava/.libs:/opt/gcc-4_2-build/gcc
Setting LD_LIBRARY_PATH to
.:/opt/gcc-4_2-build/i686-pc-linux-gnu/./libjava/.libs:/opt/gcc-4_2-build/gcc:.:/opt/gcc-4_2-build/i686-pc-linux-gnu/./libjava/.libs:/opt/gcc-4_2-build/gcc:/opt/gcc-4_2-build/i686-pc-linux-gnu/libstdc++-v3/.libs:/opt/gcc-4_2-build/i686-pc-linux-gnu/libmudflap/.libs:/opt/gcc-4_2-build/i686-pc-linux-gnu/libssp/.libs:/opt/gcc-4_2-build/i686-pc-linux-gnu/libgomp/.libs:/opt/gcc-4_2-build/./gcc:/opt/gcc-4_2-build/./prev-gcc
Hello!
PASS: PR9577 output
byte compile: /opt/gcc-4_2-build/gcc/gcj
-B/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/ -B/opt/gcc-4_2-build/gcc/
--encoding=UTF-8 -C
-I/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/testsuite/../libgcj-4.2.0.jar -g
/root/downloads/gcc-4_2-branch/libjava/testsuite/libjava.cni/longfield.java -d
/opt/gcc-4_2-build/i686-pc-linux-gnu/libjava/testsuite 2>@ stdout
PASS: bytecompile
/root/downloads/gcc-4_2-branch/libjava/testsuite/libjava.cni/longfield.java


When I build this on the "i686-pc-cygwin" target the begining of the
libjava.log looks like this:

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using
/cygdrive/C/makecygwin/gcc-4_2-branch/libjava/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running
/cygdrive/C/makecygwin/gcc-4_2-branch/libjava/testsuite/libjava.cni/cni.exp ...
byte compile: /cygdrive/c/gcc-4_2-branch-build-9c/gcc/gcj
-B/cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava/
-B/cygdrive/c/gcc-4_2-branch-build-9c/gcc/ --encoding=UTF-8 -C
-I/cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava/testsuite/../libgcj-4.2.0.jar
-g
/cygdrive/C/makecygwin/gcc-4_2-branch/libjava/testsuite/libjava.cni/PR9577.java
-d /cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava/testsuite 2>@
stdout
PASS: bytecompile
/cygdrive/C/makecygwin/gcc-4_2-branch/libjava/testsuite/libjava.cni/PR9577.java
spawn /cygdrive/c/gcc-4_2-branch-build-9c/gcc/jv-scan --encoding=UTF-8
/cygdrive/C/makecygwin/gcc-4_2-branch/libjava/testsuite/libjava.cni/PR9577.java
--list-class 
PR9577 spawn /cygdrive/c/gcc-4_2-branch-build-9c/gcc/gcjh PR9577 
gcjh: PR9577: no such class
FAIL: PR9577 header generation
byte compile: /cygdrive/c/gcc-4_2-branch-build-9c/gcc/gcj
-B/cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava/
-B/cygdrive/c/gcc-4_2-branch-build-9c/gcc/ --encoding=UTF-8 -C
-I/cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava/testsuite/../libgcj-4.2.0.jar
-g
/cygdrive/C/makecygwin/gcc-4_2-branch/libjava/testsuite/libjava.cni/longfield.java
-d /cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava/testsuite 2>@
stdout
PASS: bytecompile
/cygdrive/C/makecygwin/gcc-4_2-branch/libjava/testsuite/libjava.cni/longfield.java


The manner is which Java is being checked _seems_ completely different. I'm not
a Java expert, in fact I only know a little about it - shouldn't Java be
(identical) _independant_ of the platform ?

Notice the above error for the "i686-pc-cygwin" target: "gcjh: PR9577: no such
class".


If I type this (cygwin), I get this ...

$cd /cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava/testsuite

$/cygdrive/c/gcc-4_2-branch-build-9c/gcc/gcjh PR9577
gcjh: PR9577: no such class

$ /cygdrive/c/gcc-4_2-branch-build-9c/gcc/gcjh --classpath . PR9577
(no error message)
$


If I set classpath to point to the directory that contains the "PR9577.class"
file, then gcjh runs without error. This problem with the testsuite on the
Cygwin target creates many errors in the libjava section of my "make -i check"
tests that do not occur on the Linux target.


I notice that the Linux .log shows that the test environment sets up
"set_ld_library_path_env_vars" but that the Cygwin version of the tests do NOT.
I don't know that gcjh would need the "ld path" to be set (though other parts
of the test might need this), this _could_ be another problem. 

Perhaps the testsuite needs to set a CLASSPATH environment variable that is not
shown in the .log files. If I learnt java I could be of more help :) .


During the _build_ of gcc (not the "make -i check") gcjh uses these sort of
commands ("-d . -classpath '' -bootclasspath classpath/lib") and there are no
errors; but during check testing it is ran with no parameters (and complains
"no such class"):

make[3]: Entering directory
`/cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava'
make create-headers
make[4]: Entering directory
`/cygdrive/c/gcc-4_2-branch-build-9c/i686-pc-cygwin/libjava'
name=`echo classpath/lib/gnu/awt/LightweightRedirector.class | sed -e
's/\.class$//' -e 's,classpath/lib/,,'`; \
        /cygdrive/C/makecygwin/gcc-4_2-branch/mkinstalldirs `dirname $name`; \
        ./../.././gcc/gcjh -d . -classpath '' -bootclasspath classpath/lib
$name
mkdir -p -- gnu/awt
name=`echo classpath/lib/gnu/awt/j2d/AbstractGraphicsState.class | sed -e
's/\.class$//' -e 's,classpath/lib/,,'`; \
        /cygdrive/C/makecygwin/gcc-4_2-branch/mkinstalldirs `dirname $name`; \
        ./../.././gcc/gcjh -d . -classpath '' -bootclasspath classpath/lib
$name


I am not sufficiently familiar with Java to suggest a "proper" fix. I don't
want to monkey with something that I don't understand - just reporting the
tests are failing and the manner in which they run seems inconsistant.


When I run "make -i check" I get this result for Cygwin:

                === libjava Summary ===

# of expected passes            5325
# of unexpected failures        832
# of expected failures          12
# of untested testcases         823

A "reasonable" result (since 4.2.0 is not a release yet), but too many
failures.
This problem with the testsuite compilation is also the cause of so many
"untested testcases".


When I run "make -i check" I get this result for Linux:

                === libjava Summary ===

# of expected passes            6984
# of unexpected failures        22
# of expected failures          12
# of untested testcases         8

A "reasonable" result (last week there were no failures).

I'll enclose the Cygwin libjava.log.


-- 
           Summary: Libjava testsuite not setting test environment
                    parameters correctly.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31928


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