You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by zh...@apache.org on 2007/10/29 15:06:15 UTC

svn commit: r589634 [3/4] - in /harmony/enhanced/buildtest/branches/2.0/tests/stress: patches/ qa/ qa/config/ qa/src/test/ qa/src/test/stress/org/apache/harmony/test/share/stress/ qa/src/test/stress/org/apache/harmony/test/stress/api/java/io/ObjectOutp...

Modified: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/api/java/io/stress/readers/FileReader/FileReaderProvider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/api/java/io/stress/readers/FileReader/FileReaderProvider.java?rev=589634&r1=589633&r2=589634&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/api/java/io/stress/readers/FileReader/FileReaderProvider.java (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/api/java/io/stress/readers/FileReader/FileReaderProvider.java Mon Oct 29 07:05:57 2007
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */    
+ */
 /**
  * @author Dmitry Vozzhaev
  * @version $Revision: 1.2 $
@@ -33,41 +33,34 @@
 import org.apache.harmony.test.stress.api.java.io.stress.readers.share.ReaderPair;
 import org.apache.harmony.test.stress.api.java.io.stress.readers.share.ReaderProvider;
 
-
-/*
- * May 2, 2006
- */
-
 public abstract class FileReaderProvider extends ReaderProvider {
 
-	private File file;
+    public ReaderPair getNext() throws IOException {
+        return new ReaderPair() {
 
-	public ReaderPair getNext() throws IOException {
-		return new ReaderPair() {
+            private Writer output;
+            private Reader input;
+            private File file;
+
+            public void teardown() throws IOException {
+                input.close();
+                file.delete();
+            }
+
+            public Reader getInput() throws IOException {
+                output.close();
+                input = new FileReader(file);
+                return input;
+            }
+
+            public Writer getOutput() throws IOException {
+                file = getNextFile();
+                output = new FileWriter(file);
+                return output;
+            }
 
-			private Writer output;
-			private Reader input;
-			private File file;
-			
-			public void teardown() throws IOException {
-				input.close();
-				file.delete();
-			}
-
-			public Reader getInput() throws IOException {
-				output.close();
-				input = new FileReader(file);
-				return input;
-			}
-
-			public Writer getOutput() throws IOException {
-				file = getNextFile();
-				output = new FileWriter(file);
-				return output;
-			}
-			
-		};
-	}
+        };
+    }
 
-	public abstract File getNextFile() throws IOException;
+    public abstract File getNextFile() throws IOException;
 }

Modified: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/LargeCode/testCodeLmt_0.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/LargeCode/testCodeLmt_0.java?rev=589634&r1=589633&r2=589634&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/LargeCode/testCodeLmt_0.java (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/LargeCode/testCodeLmt_0.java Mon Oct 29 07:05:57 2007
@@ -80,8 +80,8 @@
                     arClss[i] = Class.forName(pkgN.concat(".").concat(nm));
                     arObjs[i] = arClss[i].newInstance();
 
-                    m = arClss[i].getMethod("get", null);
-                    int ans = ((Integer) (m.invoke(arObjs[i], null)))
+                    m = arClss[i].getMethod("get");
+                    int ans = ((Integer) (m.invoke(arObjs[i])))
                             .intValue();
                     if (i % 2 == 0) {
                         if (ans == 104) {

Modified: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SubClasses/testManySubClasses_0.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SubClasses/testManySubClasses_0.java?rev=589634&r1=589633&r2=589634&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SubClasses/testManySubClasses_0.java (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SubClasses/testManySubClasses_0.java Mon Oct 29 07:05:57 2007
@@ -114,7 +114,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get")) {
-                            lans = ((Long) (mm[j].invoke(arObjs[i], null)))
+                            lans = ((Long) (mm[j].invoke(arObjs[i])))
                                     .longValue();
                             if (i != 0) {
                                 if (lans != (long) i) {

Modified: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SupIntf/testManySupIntf_01.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SupIntf/testManySupIntf_01.java?rev=589634&r1=589633&r2=589634&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SupIntf/testManySupIntf_01.java (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/NotSynchThreads/SupIntf/testManySupIntf_01.java Mon Oct 29 07:05:57 2007
@@ -106,7 +106,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != finF) {
                                 ReliabilityRunner.debug("Incorrect get(): " + ans1 + " must be "
@@ -138,7 +138,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get0")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != finF) {
                                 ReliabilityRunner.debug("Incorrect get1(): " + ans1 + " must be "
@@ -168,7 +168,7 @@
 
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get1")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 100) {
                                 ReliabilityRunner.debug("Incorrect get2(): " + ans1
@@ -198,7 +198,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get2")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 200) {
                                 ReliabilityRunner.debug("Incorrect get2(): " + ans1
@@ -229,7 +229,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get3")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 300) {
                                 ReliabilityRunner.debug("Incorrect get3(): " + ans1
@@ -261,7 +261,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get4")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 400) {
                                 ReliabilityRunner.debug("Incorrect get4(): " + ans1
@@ -292,7 +292,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get5")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 500) {
                                 ReliabilityRunner.debug("Incorrect get5(): " + ans1
@@ -324,7 +324,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get500")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 500) {
                                 ReliabilityRunner.debug("Incorrect get500(): " + ans1
@@ -357,7 +357,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get499")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 500) {
                                 ReliabilityRunner.debug("Incorrect get499(): " + ans1
@@ -390,7 +390,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get498")) {
-                            ans1 = ((Integer) (mm[j].invoke(arObjs[i], null)))
+                            ans1 = ((Integer) (mm[j].invoke(arObjs[i])))
                                     .intValue();
                             if (ans1 != 500) {
                                 ReliabilityRunner.debug("Incorrect get498(): " + ans1

Modified: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/LargeCode/testCodeLmt.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/LargeCode/testCodeLmt.java?rev=589634&r1=589633&r2=589634&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/LargeCode/testCodeLmt.java (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/LargeCode/testCodeLmt.java Mon Oct 29 07:05:57 2007
@@ -60,7 +60,7 @@
                         + cntLoop);
 
         Object[] arObjs;
-        Class[] arClss;
+        Class<?>[] arClss;
         Method m;
 
         for (int t = 0; t < cntLoop; t++) {
@@ -78,9 +78,8 @@
                     arClss[i] = Class.forName(nm);
                     arObjs[i] = arClss[i].newInstance();
 
-                    m = arClss[i].getMethod("get", null);
-                    int ans = ((Integer) (m.invoke(arObjs[i], null)))
-                            .intValue();
+                    m = arClss[i].getMethod("get");
+                    int ans = ((Integer) (m.invoke(arObjs[i]))).intValue();
                     if (ans != ReliabilityRunner.RESULT_PASS) {
                         ReliabilityRunner.debug("Test failed: incorrect result: " + ans
                                 + " class: " + nm);
@@ -103,9 +102,8 @@
                     arClss[i] = Class.forName(nm);
                     arObjs[i] = arClss[i].newInstance();
 
-                    m = arClss[i].getMethod("get", null);
-                    int ans = ((Integer) (m.invoke(arObjs[i], null)))
-                            .intValue();
+                    m = arClss[i].getMethod("get");
+                    ((Integer) (m.invoke(arObjs[i]))).intValue();
                     ReliabilityRunner.debug("Test failed: InvocationTargetException must be thrown. "
                             + " Class: " + nm);
                     ReliabilityRunner.mainTest.addError(this, new ClassLoaderTestError());

Modified: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/ManyClasses/testNewClassLoader1.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/ManyClasses/testNewClassLoader1.xml?rev=589634&r1=589633&r2=589634&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/ManyClasses/testNewClassLoader1.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/ManyClasses/testNewClassLoader1.xml Mon Oct 29 07:05:57 2007
@@ -17,36 +17,34 @@
  specific language governing permissions and limitations
  under the License.
 -->
-<!DOCTYPE Test SYSTEM "test.dtd">
-<!--
-Author: Vera Y.Petrashkova
-Version: $Revision: 1.5 $
--->
-<Test ID="testNewClassLoader1" 
-        date-of-creation="2005-11-17"
-        timeout="1">
-    	<Copyright value="apache"/>
-        <Author value="Vera Y. Petrashkova"/>
-        <Description>
-	        Load a lot of correct classes using new class loader
-        	Parameters: 0 - one class loader - one class 
-        	            1 - number of iterations
-       		            2 - number of used classes
-       		            3 - location of used class
-        </Description>
-        <Keyword name="stress"/>
-        <Source name="../../share/CorrectClasses/testCorrectClass.java"/>        
-        <Source name="../../share/CorrectClasses/testCorrectClass_0.ccode"/>        
-        <Source name="../../share/CorrectClasses/newClassLoader.java"/>
-        <Runner ID="Runtime">
-            <Option value="-Dorg.apache.harmony.test.share.stress.ReliabilityRunner.params=
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="testNewClassLoader1" timeout="1">
+	<Description> Load correct classes using class loader
+        Parameters:
+            0 - one class loader - one class
+		    1 - number of iterations
+            2 - number of used classes
+            3 - location of used class
+    </Description>
+	<Keyword name="stress"/>
+	<Source name="../../share/CorrectClasses/testCorrectClass.java"/>
+	<Source name="../../share/CorrectClasses/testCorrectClass_0.ccode"/>
+	<Source name="../../share/CorrectClasses/newClassLoader.java"/>
+	<Runner ID="Runtime">
+		<Option
+			value="-Dorg.apache.harmony.test.share.stress.ReliabilityRunner.params=
 					org.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass {}"/>
-            <Option value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg0=1"/>
-            <Option value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg1=10"/>
-            <Option value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg2=1000"/>
-            <Option value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg3=$TestSuiteClassRoot"/>
-		<Param name="toRun" value="org.apache.harmony.test.share.stress.ReliabilityRunner">
+		<Option
+			value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg0=1"/>
+		<Option
+			value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg1=10"/>
+		<Option
+			value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg2=1000"/>
+		<Option
+			value="-Dorg.apache.harmony.test.stress.classloader.share.CorrectClasses.testCorrectClass.arg3=$TestSuiteClassRoot"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.share.stress.ReliabilityRunner">
 		</Param>
-		</Runner> 
-		<Restriction name="OtherVMOnly"/>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
 </Test>

Modified: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/SubClasses/testManySubClasses.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/SubClasses/testManySubClasses.java?rev=589634&r1=589633&r2=589634&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/SubClasses/testManySubClasses.java (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/classloader/OneThread/SubClasses/testManySubClasses.java Mon Oct 29 07:05:57 2007
@@ -132,7 +132,7 @@
                     fnd = false;
                     for (int j = 0; j < mm.length; j++) {
                         if (mm[j].getName().equals("get")) {
-                            lans = ((Long) (mm[j].invoke(arObjs[i], null)))
+                            lans = ((Long) (mm[j].invoke(arObjs[i])))
                                     .longValue();
                             if (i != 0) {
                                 if (lans != (long) i) {

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/chain/ChainBadFinalizeTest1/ChainBadFinalizeTest1.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/chain/ChainBadFinalizeTest1/ChainBadFinalizeTest1.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/chain/ChainBadFinalizeTest1/ChainBadFinalizeTest1.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/chain/ChainBadFinalizeTest1/ChainBadFinalizeTest1.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "test.dtd">
+<Test
+	ID="ChainBadFinalizeTest1"
+        date-of-creation="2005-01-31"
+        timeout="3"
+        >
+        <!--
+        Author:  Alexander Esin
+        Version: $Revision: 1.5 $
+        -->
+    	<Copyright value="apache"/>
+        <Author value="Alexander Esin"/>
+        	<Description>
+                    Allocate memory by chain objects: each object of the class contains reference to the same class and to byte array. Also finalize() function is defined for the objects which uses reference to the variable in the main program in which it is assigned to null. Allocation is performed in double loop. Inner loop contains allocation of this chain, also it is taken in the account that total size of the chain does not reach heap limit. At the end of the inner loop the head of the chain is assigned to null. Check if OutOfMemoryError not thrown. Check if finalize() is invoked at least once.
+        	</Description>
+        
+        <Keyword name="stress"/>
+        <Source name="ChainTest.java"/>
+        <Modification date="2006-01-31" author="Alexander Esin"/>
+        
+        <Runner ID="Runtime">
+                <Option name="-Xmx80m"/>
+               	<Option value="-Dorg.apache.harmony.test.share.stress.ReliabilityRunner.params=
+					org.apache.harmony.test.stress.gc.chain.ChainBadFinalizeTest1.ChainTest {}"/>
+			<Param name="toRun" value="org.apache.harmony.test.share.stress.ReliabilityRunner">
+			</Param>
+		</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest1024.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest1024.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest1024.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest1024.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationTest1024" timeout="4">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. The test estimates heap utilization. </Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../../share/GcTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx1024m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.share.GcTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest64.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest64.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest64.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationTest64.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationTest64" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. The test estimates heap utilization. </Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../../share/GcTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx64m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.share.GcTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationThreadTest16.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationThreadTest16.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationThreadTest16.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/Fragmentation/FragmentationThreadTest16.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationThreadTest16" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. The test estimates heap utilization. </Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../../share/GcTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx16m"/>
+		<Option value="-DconcurrentCount=1024"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.share.GcTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationEmptyFinalizerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationEmptyFinalizerTest.java?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationEmptyFinalizerTest.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationEmptyFinalizerTest.java Mon Oct 29 07:05:57 2007
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.harmony.test.stress.gc.frag;
+
+import org.apache.harmony.test.stress.gc.share.GcTest;
+
+public class FragmentationEmptyFinalizerTest extends GcTest {
+
+    public static void main(String args[]) {
+        runTestClass();
+    }
+
+    public void setUpBeforeWatchers() throws Exception {
+        super.setUpBeforeWatchers();
+        setCompositeObjectClass(FinalizableObject.class);
+    }
+    
+    /**
+     * The object with an empty finalizer.
+     */
+    public class FinalizableObject {
+        Object _load;
+
+        public FinalizableObject(Object load, int size) {
+            _load = load;
+        }
+
+        protected void finalize() {
+        }
+    }
+
+}

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationEmptyFinalizerTest.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationEmptyFinalizerTest.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationEmptyFinalizerTest.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationEmptyFinalizerTest.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationEmptyFinalizerTest" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each object has empty finalize() method. The test estimates heap
+			utilization. </Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationEmptyFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationEmptyFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerReviveTest64.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerReviveTest64.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerReviveTest64.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerReviveTest64.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerReviveTest64" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description>Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each object revives in finalize() method. The test estimates heap
+			utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerReviveTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx64m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerReviveTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest1024.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest1024.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest1024.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest1024.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerTest1024" timeout="4">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each finalize() method invocation is registered. The test
+			estimates heap utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx1024m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerTest16" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each finalize() method invocation is registered. The test
+			estimates heap utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx16m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_1024.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_1024.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_1024.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_1024.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerTest16_1024" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each finalize() method invocation is registered. The test
+			estimates heap utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx16m"/>
+		<Option value="-DmaxBytes=1024"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_65536.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_65536.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_65536.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_65536.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerTest16_65536" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each finalize() method invocation is registered. The test
+			estimates heap utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx16m"/>
+		<Option value="-DminBytes=8192"/>
+		<Option value="-DmaxBytes=65536"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_8192.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_8192.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_8192.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest16_8192.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerTest16_8192" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each finalize() method invocation is registered. The test
+			estimates heap utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx16m"/>
+		<Option value="-DminBytes=1024"/>
+		<Option value="-DmaxBytes=8192"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest256.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest256.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest256.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest256.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerTest256" timeout="2">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each finalize() method invocation is registered. The test
+			estimates heap utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx256m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest64.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest64.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest64.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerTest64.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerTest64" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each finalize() method invocation is registered. The test
+			estimates heap utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx64m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerWaitTest.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerWaitTest.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerWaitTest.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizer/FragmentationFinalizerWaitTest.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationFinalizerWaitTest" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Each object waits in finalize() method. The test estimates heap
+			utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationFinalizerWaitTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationFinalizerWaitTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerReviveTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerReviveTest.java?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerReviveTest.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerReviveTest.java Mon Oct 29 07:05:57 2007
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.harmony.test.stress.gc.frag;
+
+import org.punit.watcher.CustomWatcher;
+
+public class FragmentationFinalizerReviveTest extends
+        FragmentationFinalizerTest implements Runnable {
+
+    public static void main(String args[]) {
+        runTestClass();
+    }
+
+    /**
+     * The list contains revived finalizable objects.
+     */
+    RevivingObject _revived;
+
+    private synchronized void _revive(RevivingObject f) {
+        f._next = _revived;
+        _revived = f;
+    }
+
+    /**
+     * These objects delay finalization until {@link #reclaimHeap()} happens.
+     */
+    public class RevivingObject extends
+            FragmentationFinalizerTest.FinalizableObject {
+
+        RevivingObject _next;
+
+        public RevivingObject(Object load, int size) {
+            super(load, size);
+        }
+
+        protected void finalize() {
+            if (CustomWatcher.shouldStop()) {
+                super.finalize();
+            } else {
+                _revive(this);
+            }
+        }
+    }
+
+    public void setUpBeforeWatchers() throws Exception {
+        super.setUpBeforeWatchers();
+        setCompositeObjectClass(RevivingObject.class);
+        (new Thread(this)).start();
+    }
+
+    public void tearDownBeforeWatchers() throws Exception {
+        reclaimRevived();
+        super.tearDownBeforeWatchers();
+    }
+
+    public void run() {
+        while (!CustomWatcher.shouldStop()) {
+            waitThis();
+            reclaimRevived();
+        }
+    }
+
+    private synchronized void reclaimRevived() {
+        while (_revived != null) {
+            int size = _revived._size;
+            _revived = _revived._next;
+            reportFreed(size);
+        }
+    }
+}

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerTest.java?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerTest.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerTest.java Mon Oct 29 07:05:57 2007
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.harmony.test.stress.gc.frag;
+
+import org.apache.harmony.test.stress.gc.share.GcTest;
+
+public class FragmentationFinalizerTest extends GcTest {
+
+    public static void main(String args[]) {
+        runTestClass();
+    }
+
+    public void setUpBeforeWatchers() throws Exception {
+        super.setUpBeforeWatchers();
+        setCompositeObjectClass(FinalizableObject.class);
+    }
+
+    /**
+     * The object with a non-empty finalizer.
+     */
+    public class FinalizableObject {
+        @SuppressWarnings("unused")
+        private Object _load;
+
+        protected int _size;
+
+        public FinalizableObject(Object load, int size) {
+            _load = load;
+            _size = size;
+        }
+
+        protected void finalize() {
+            reportFreed(_size);
+        }
+    }
+
+    @Override
+    protected synchronized void reportRemoved(int size) {
+        // register removal later during finalization
+    }
+}

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerWaitTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerWaitTest.java?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerWaitTest.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationFinalizerWaitTest.java Mon Oct 29 07:05:57 2007
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.harmony.test.stress.gc.frag;
+
+import org.punit.watcher.CustomWatcher;
+
+public class FragmentationFinalizerWaitTest extends
+        FragmentationFinalizerTest {
+
+    public static void main(String args[]) {
+        runTestClass();
+    }
+
+    public void setUpBeforeWatchers() throws Exception {
+        super.setUpBeforeWatchers();
+        setCompositeObjectClass(WaitingObject.class);
+    }
+
+    /**
+     * These objects delay finalization until {@link #reclaimHeap()} happens.
+     */
+    public class WaitingObject extends
+            FragmentationFinalizerTest.FinalizableObject {
+
+        public WaitingObject(Object load, int size) {
+            super(load, size);
+        }
+
+        protected void finalize() {
+            if (!CustomWatcher.shouldStop()) {
+                waitThis();
+            }
+            super.finalize();
+        }
+    }
+}

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationSoftRefTest" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Big objects are softly refrenced. The test estimates heap
+			utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationSoftRefTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationSoftRefTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest1024.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest1024.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest1024.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationSoftRefTest1024.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationSoftRefTest1024" timeout="4">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Big objects are softly refrenced. The test estimates heap
+			utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationSoftRefTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Option name="-Xmx1024m"/>
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationSoftRefTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationWeakRefTest.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationWeakRefTest.xml?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationWeakRefTest.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationReference/FragmentationWeakRefTest.xml Mon Oct 29 07:05:57 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Test SYSTEM "../../../../../../../../../test.dtd">
+<Test ID="FragmentationWeakRefTest" timeout="1">
+	<APITestDescription>
+		<TestedClass name="java.lang.Object"/>
+		<TestedMethod name="protected void finalize()"/>
+		<Description> Creates many objects of different size. On OutOfMemoryError deletes
+			some of them. Big objects are weakly refrenced. The test estimates heap
+			utilization and checks that each allocated object is finalized.
+			</Description>
+	</APITestDescription>
+	
+	<Keyword name="stress"/>
+	<Source name="../FragmentationWeakRefTest.java"/>
+	
+	<Runner ID="Runtime">
+		<Param name="toRun"
+			value="org.apache.harmony.test.stress.gc.frag.FragmentationWeakRefTest">
+		</Param>
+	</Runner>
+	<Restriction name="OtherVMOnly"/>
+</Test>
\ No newline at end of file

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationSoftRefTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationSoftRefTest.java?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationSoftRefTest.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationSoftRefTest.java Mon Oct 29 07:05:57 2007
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.harmony.test.stress.gc.frag;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.harmony.test.stress.gc.share.GcTest;
+import org.punit.util.MemoryUtil;
+
+public class FragmentationSoftRefTest extends GcTest implements Runnable {
+
+    public static void main(String args[]) {
+        runTestClass();
+    }
+
+    protected ReferenceQueue<Object> queue;
+
+    private boolean _shouldStop = false;
+
+    public void setUpBeforeWatchers() throws Exception {
+        super.setUpBeforeWatchers();
+        queue = new ReferenceQueue<Object>();
+        setCompositeObjectClass(SoftRef.class);
+        (new Thread(this)).start();
+    }
+
+    public void run() {
+        try {
+            while (!_shouldStop) {
+                Reference<?> ref = queue.remove();
+                ref.clear(); // report deallocation
+            }
+        } catch (InterruptedException ie) {
+            error(ie);
+        }
+    }
+
+    /**
+     * Creates an object with the given size, either array or composite object.
+     * 
+     * @return a reference to the created object
+     */
+    protected Object allocateObject(Random r, int size) {
+        Object obj;
+        if (isArraySize(size)) {
+            obj = new byte[size - ARRAY_HEADER_SIZE];
+        } else {
+            obj = super.allocateObject(r, size);
+        }
+        return obj;
+    }
+
+    /**
+     * The reference to the object.
+     */
+    public class SoftRef extends SoftReference<Object> {
+        protected int _size;
+
+        public SoftRef(Object load, int size) {
+            super(load, queue);
+            _size = size;
+        }
+
+        /**
+         * Reuses the method to report that the object is freed.
+         */
+        public synchronized void clear() {
+            super.clear();
+            if (_size > 0) {
+                reportFreed(_size);
+                _size = 0;
+            }
+        }
+
+        protected void finalize() {
+            clear();
+        }
+    }
+
+    @Override
+    protected synchronized void reportRemoved(int size) {
+        if (isArraySize(size)) {
+            super.reportRemoved(size);
+        } else {
+            // else register removal later during reference cleanup
+        }
+    }
+
+    private boolean isArraySize(int size) {
+        return size % 2 == 0;
+    }
+
+    public void tearDownBeforeWatchers() throws Exception {
+        clear();
+        super.tearDownBeforeWatchers();
+        _shouldStop = true;
+    }
+}

Added: harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationWeakRefTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationWeakRefTest.java?rev=589634&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationWeakRefTest.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/gc/frag/FragmentationWeakRefTest.java Mon Oct 29 07:05:57 2007
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.harmony.test.stress.gc.frag;
+
+import java.lang.ref.WeakReference;
+
+public class FragmentationWeakRefTest extends FragmentationSoftRefTest {
+
+    public static void main(String args[]) {
+        runTestClass();
+    }
+
+    public void setUpBeforeWatchers() throws Exception {
+        super.setUpBeforeWatchers();
+        setCompositeObjectClass(WeakRef.class);
+    }
+
+    /**
+     * The reference to the object.
+     */
+    public class WeakRef extends WeakReference<Object> {
+        protected int _size;
+
+        public WeakRef(Object load, int size) {
+            super(load, queue);
+            _size = size;
+        }
+
+        /**
+         * Reuses the method to report that the object is freed.
+         */
+        public synchronized void clear() {
+            super.clear();
+            if (_size > 0) {
+                reportFreed(_size);
+                _size = 0;
+            }
+        }
+
+        protected void finalize() {
+            clear();
+        }
+    }
+}