Reviewer needed - fix for regression test hotspot/test/runtime/6929067/Test6929067

Dr Andrew John Hughes ahughes at redhat.com
Tue Nov 16 07:21:39 PST 2010


On 16:14 Tue 16 Nov     , Pavel Tisnovsky wrote:
> Dr Andrew John Hughes wrote:
> > On 18:44 Mon 15 Nov     , Pavel Tisnovsky wrote:
> >> Hi all,
> >>
> >> can anybody please review fix for regression test
> >> hotspot/test/runtime/6929067/Test6929067
> >>
> >> I changed this test in a way that it now correctly works on x86_64
> >> platform, for example (it has to find where libjvm.so is placed instead
> >> of using constant path). Tested on RHEL 5 x86_64 but it should works on
> >> another systems too.
> >>
> > 
> > ARCH=$(uname -m)
> > if test "${ARCH}" == "x86_64"; then
> >     ARCH=amd64;
> > fi
> > LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/client:${TESTJAVA}/jre/lib/${ARCH}/server:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH
> > 
> > would achieve the same goal without using find.
> 
> Yeah it nicely solves the first problem, but I'd like to stay on my
> version because we also have to use the exact path to properly compile
> "invoke" tool - calling of gcc is located near the end of this script.
> 

The problem with using find is that you don't know what libjvm.so you'll
end up with, which makes any future issues hard to diagnose.  With the
above, we know it's the client vm if available, and the server vm if not.

IMHO, the gcc invocation should be using -ljvm.

> > 
> >> Diffstat produced against IcedTea6 HEAD is stored in attachment.
> >>
> > 
> > Again, no 'icedtea-' prefix.
> > 
> >> Thank you in advance
> >> Pavel
> > 
> >> # HG changeset patch
> >> # User ptisnovs
> >> # Date 1289843015 -3600
> >> # Node ID bf47d6f0dd12f7ed7a34d0110d2bbd6361d6616b
> >> # Parent  ad1c77031a41739f3a912d27459a23a930ef4b88
> >> Testcase correction.
> >>
> >> diff -r ad1c77031a41 -r bf47d6f0dd12 ChangeLog
> >> --- a/ChangeLog	Fri Nov 12 18:17:22 2010 +0000
> >> +++ b/ChangeLog	Mon Nov 15 18:43:35 2010 +0100
> >> @@ -1,3 +1,10 @@
> >> +2010-11-15  Pavel Tisnovsky  <ptisnovs at redhat.com>
> >> +
> >> +	* Makefile.am: Add new patch.
> >> +	* patches/jtreg-patch-Test6929067.patch:
> >> +	Testcase correction - now the test works correctly also on x86_64 and
> >> +	other platforms.
> >> +
> >>  2010-11-12  Andrew John Hughes  <ahughes at redhat.com>
> >>  
> >>  	* Makefile.am:
> >> diff -r ad1c77031a41 -r bf47d6f0dd12 Makefile.am
> >> --- a/Makefile.am	Fri Nov 12 18:17:22 2010 +0000
> >> +++ b/Makefile.am	Mon Nov 15 18:43:35 2010 +0100
> >> @@ -300,7 +300,8 @@
> >>  	patches/openjdk/6622432-bigdecimal_performance.patch \
> >>  	patches/openjdk/6850606-bigdecimal_regression.patch \
> >>  	patches/openjdk/6876282-bigdecimal_divide.patch \
> >> -	patches/f14-fonts.patch
> >> +	patches/f14-fonts.patch \
> >> +	patches/icedtea-jtreg-Test6929067.patch
> >>  
> >>  if WITH_ALT_HSBUILD
> >>  ICEDTEA_PATCHES += \
> >> diff -r ad1c77031a41 -r bf47d6f0dd12 patches/icedtea-jtreg-Test6929067.patch
> >> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> >> +++ b/patches/icedtea-jtreg-Test6929067.patch	Mon Nov 15 18:43:35 2010 +0100
> >> @@ -0,0 +1,23 @@
> >> +--- openjdk-old/hotspot/test/runtime/6929067/Test6929067.sh	2010-10-08 22:29:24.000000000 +0200
> >> ++++ openjdk/hotspot/test/runtime/6929067/Test6929067.sh	2010-11-15 12:47:57.000000000 +0100
> >> +@@ -42,7 +42,11 @@
> >> +     ;;
> >> + esac
> >> + 
> >> +-LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/i386/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH
> >> ++PATH_TO_LIBJVM=`find ${TESTJAVA}/jre/lib -name libjvm.so | tail -n 1 | sed 's/\(.*\)\(\/libjvm\.so\)/\1/g'`
> >> ++
> >> ++echo $PATH_TO_LIBJVM
> >> ++
> >> ++LD_LIBRARY_PATH=.:${PATH_TO_LIBJVM}:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH
> >> + export LD_LIBRARY_PATH
> >> + 
> >> + THIS_DIR=`pwd`
> >> +@@ -55,6 +59,6 @@
> >> + 
> >> + ${TESTJAVA}${FS}bin${FS}javac T.java
> >> + 
> >> +-gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/i386/client/libjvm.so
> >> ++gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${PATH_TO_LIBJVM}/libjvm.so
> >> + ./invoke
> >> + exit $?
> > 
> > 
> 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8



More information about the distro-pkg-dev mailing list