changeset 1441:33c8fa162aae

2009-03-16 Omair Majid <omajid@redhat.com> * patches/icedtea-jtreg-hatrun.patch: New patch. Fixes sun/tools/jhat/HatHeapDump1Test.java by passing the classpath to the new jvm. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above.
author Omair Majid <omajid@redhat.com>
date Mon, 16 Mar 2009 17:17:23 -0400
parents 1b405ec97753
children 3e8846035a79
files ChangeLog HACKING Makefile.am patches/icedtea-jtreg-hatrun.patch
diffstat 4 files changed, 53 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Mar 14 17:13:20 2009 +0100
+++ b/ChangeLog	Mon Mar 16 17:17:23 2009 -0400
@@ -1,3 +1,11 @@
+2009-03-16  Omair Majid  <omajid@redhat.com>
+
+	* patches/icedtea-jtreg-hatrun.patch: New patch. Fixes
+	sun/tools/jhat/HatHeapDump1Test.java by passing the classpath to the new
+	jvm.
+	* Makefile.am (ICEDTEA_PATCHES): Apply the above.
+	* HACKING: Document the above.
+
 2009-03-14  Matthias Klose  <doko@ubuntu.com>
 
 	* patches/icedtea-s390-noinline.patch: Add special flags for javac on
--- a/HACKING	Sat Mar 14 17:13:20 2009 +0100
+++ b/HACKING	Mon Mar 16 17:17:23 2009 -0400
@@ -87,6 +87,7 @@
 * icedtea-xml-encodinginfo.patch: Fix possible StackOverflowError in EncodingInfo (PR295).
 * icedtea-jtreg-6592792.patch: Fix jtreg test for bug 6592792 so that it compiles.
 * icedtea-s390-noinline.patch: Add special flags for javac on s390 to work around a VM problem with bad code generation during inlining.
+* icedtea-jtreg-hatrun.patch: Fix jhat test by passing the classpath to the new jvm in HatRun.java.
 
 The following patches are only applied to OpenJDK6 in IcedTea6:
 
--- a/Makefile.am	Sat Mar 14 17:13:20 2009 +0100
+++ b/Makefile.am	Mon Mar 16 17:17:23 2009 -0400
@@ -664,6 +664,7 @@
 	patches/icedtea-xml-encodinginfo.patch \
 	patches/icedtea-jtreg-6592792.patch \
 	patches/icedtea-s390-noinline.patch \
+	patches/icedtea-jtreg-hatrun.patch \
 	$(DISTRIBUTION_PATCHES)
 
 stamps/extract.stamp: stamps/download.stamp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-jtreg-hatrun.patch	Mon Mar 16 17:17:23 2009 -0400
@@ -0,0 +1,43 @@
+--- openjdk/jdk/test/sun/tools/jhat/HatRun.java.orig	2009-03-16 15:01:45.000000000 -0400
++++ openjdk/jdk/test/sun/tools/jhat/HatRun.java	2009-03-16 15:05:06.000000000 -0400
+@@ -161,6 +161,7 @@
+     public void runit(String class_name, String vm_options[])
+     {
+         String jre_home  = System.getProperty("java.home");
++        String classpath = System.getProperty("java.class.path");
+         String sdk_home  = (jre_home.endsWith("jre") ?
+                             (jre_home + File.separator + "..") :
+                             jre_home );
+@@ -176,21 +177,25 @@
+                            + File.separator + "jhat";
+         /* Array of strings to be passed in for exec:
+          *   1. java
+-         *   2. -Dtest.classes=.
+-         *   3. -d64                 (optional)
+-         *   4. -Xcheck:jni          (Just because it finds bugs)
+-         *   5. -Xverify:all         (Make sure verification is on full blast)
+-         *   6. -agent
++         *   2. -cp 
++         *   3. classpath
++         *   4. -Dtest.classes=.
++         *   5. -d64                 (optional)
++         *   6. -Xcheck:jni          (Just because it finds bugs)
++         *   7. -Xverify:all         (Make sure verification is on full blast)
++         *   8. -agent
+          *       vm_options
+-         *   7+i. classname
++         *   9+i. classname
+          */
+         int nvm_options = 0;
+         if ( vm_options != null ) nvm_options = vm_options.length;
+-        String cmd[]     = new String[1 + (d64?1:0) + 5 + nvm_options];
++        String cmd[]     = new String[1 + (d64?1:0) + 7 + nvm_options];
+         int i,j;
+ 
+         i = 0;
+         cmd[i++] = java;
++        cmd[i++] = "-cp";
++        cmd[i++] = classpath;
+         cmd[i++] = "-Dtest.classes=" + cdir;
+         if ( d64 ) {
+             cmd[i++] = "-d64";