changeset 2601:f5b82f792313

Regression test fix: Make sure that the regression test openjdk/jdk/test/sun/net/www/protocol/file/FileMap.java deletes all its work files.
author ptisnovs
date Thu, 16 Jun 2011 13:19:25 +0200
parents 830e2c11d9f3
children fe70aef2215d
files ChangeLog Makefile.am patches/jtreg-FileMap.patch
diffstat 3 files changed, 34 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jun 15 15:29:46 2011 -0400
+++ b/ChangeLog	Thu Jun 16 13:19:25 2011 +0200
@@ -1,3 +1,11 @@
+2011-06-16  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* Makefile.am: added new patch
+	* patches/jtreg-FileMap.patch:
+	Make sure that the regression test
+	openjdk/jdk/test/sun/net/www/protocol/file/FileMap.java
+	deletes all its work files.
+
 2011-06-15  Danesh Dadachanji  <ddadacha@redhat.com>
 
 	* AUTHORS: Added myself.
--- a/Makefile.am	Wed Jun 15 15:29:46 2011 -0400
+++ b/Makefile.am	Thu Jun 16 13:19:25 2011 +0200
@@ -356,7 +356,8 @@
 	patches/jtreg-ChangeDir.patch \
 	patches/jtreg-TempBuffer.patch \
 	patches/jtreg-EncodedMultiByteChar.patch \
-	patches/jtreg-FileLoaderTest.patch
+	patches/jtreg-FileLoaderTest.patch \
+	patches/jtreg-FileMap.patch
 
 if WITH_ALT_HSBUILD
 ICEDTEA_PATCHES += \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jtreg-FileMap.patch	Thu Jun 16 13:19:25 2011 +0200
@@ -0,0 +1,24 @@
+--- openjdk.orig/jdk/test/sun/net/www/protocol/file/FileMap.java	2011-02-28 17:07:06.000000000 +0100
++++ openjdk/jdk/test/sun/net/www/protocol/file/FileMap.java	2011-06-16 11:30:19.000000000 +0200
+@@ -32,8 +32,9 @@
+ 
+ public class FileMap {
+     public static void main(String[] args) {
++        File f = null;
+         try {
+-            File f = File.createTempFile("test", null);
++            f = File.createTempFile("test", null);
+             f.deleteOnExit();
+             String s = f.getAbsolutePath();
+             s = s.startsWith("/") ? s : "/" + s;
+@@ -48,5 +49,10 @@
+         } catch (Exception ex) {
+             throw new RuntimeException("Unexpected exception: " + ex);
+         }
++        finally {
++            if ( f != null ) {
++                f.delete();
++            }
++        }
+     }
+ }