harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r478858 - in /harmony/enhanced/drlvm/trunk: build/make/excludes/ vm/tests/kernel/java/lang/ vm/thread/src/
Date Fri, 24 Nov 2006 12:30:44 GMT
Author: varlax
Date: Fri Nov 24 04:30:44 2006
New Revision: 478858

URL: http://svn.apache.org/viewvc?view=rev&rev=478858
Log:
Applied HARMONY-2294 [drlvm][kernel test] ObjectTest needs to be included back to test runs
Tested on WinXP

Modified:
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.int
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.jet
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.opt
    harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ObjectTest.java
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_condvar.c

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.int
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.int?view=diff&rev=478858&r1=478857&r2=478858
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.int
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.int
Fri Nov 24 04:30:44 2006
@@ -1,13 +1,10 @@
 ## These tests are too slow
 java/lang/RuntimeAdditionalTest*.java
 
-## Tese tests are unstable and hang often
+## These tests are unstable and hang often
 java/lang/RuntimeAdditionalTest11.java
 java/lang/RuntimeAdditionalTest34.java
 java/lang/RuntimeAdditionalTest39.java
 java/lang/RuntimeAdditionalTest40.java
 java/lang/RuntimeAdditionalTest41.java
 java/lang/RuntimeAdditionalTest42.java
-
-java/lang/ObjectTest.java
-

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.jet
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.jet?view=diff&rev=478858&r1=478857&r2=478858
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.jet
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.jet
Fri Nov 24 04:30:44 2006
@@ -1,13 +1,10 @@
 ## These tests are too slow
 java/lang/RuntimeAdditionalTest*.java
 
-## Tese tests are unstable and hang often
+## These tests are unstable and hang often
 java/lang/RuntimeAdditionalTest11.java
 java/lang/RuntimeAdditionalTest34.java
 java/lang/RuntimeAdditionalTest39.java
 java/lang/RuntimeAdditionalTest40.java
 java/lang/RuntimeAdditionalTest41.java
 java/lang/RuntimeAdditionalTest42.java
-
-java/lang/ObjectTest.java
-

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.opt?view=diff&rev=478858&r1=478857&r2=478858
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.opt
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_kernel.windows.x86.opt
Fri Nov 24 04:30:44 2006
@@ -1,13 +1,10 @@
 ## These tests are too slow
 java/lang/RuntimeAdditionalTest*.java
 
-## Tese tests are unstable and hang often
+## These tests are unstable and hang often
 java/lang/RuntimeAdditionalTest11.java
 java/lang/RuntimeAdditionalTest34.java
 java/lang/RuntimeAdditionalTest39.java
 java/lang/RuntimeAdditionalTest40.java
 java/lang/RuntimeAdditionalTest41.java
 java/lang/RuntimeAdditionalTest42.java
-
-java/lang/ObjectTest.java
-

Modified: harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ObjectTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ObjectTest.java?view=diff&rev=478858&r1=478857&r2=478858
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ObjectTest.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ObjectTest.java Fri Nov 24 04:30:44
2006
@@ -208,8 +208,11 @@
                 fail("The main thread was interrupted!");
             }
         }
-        assertTrue("Current thread hasn't sleep enough!",
-                finish - start + 1 > millis);
+        long atLeastWait = millis - 1;
+        long actualWait = finish - start;
+        assertTrue("Current thread hasn't slept enough: " + 
+                "expected at least " + atLeastWait + " but was " + actualWait,
+                actualWait >= atLeastWait);
     }
 
     public void testWaitlongint1() {
@@ -277,6 +280,8 @@
             public void run() {
                 try {
                     synchronized (o) {
+                        threadStarted = true;
+                        o.notify();
                         o.wait();
                     }
                 } catch (InterruptedException e) {
@@ -284,13 +289,15 @@
                 }
             }
         };
-        t.start();
-        for (int i = 0; !t.isAlive() && i < 60; i++) {
-            try {
-                Thread.sleep(50);
-            } catch (Exception e) {
-                fail("The main thread was interrupted!");
-            }
+        try {
+        	synchronized (o) {
+                t.start();
+                while (!t.threadStarted) {
+                	o.wait();
+                }
+        	} 
+        } catch (InterruptedException e) {
+    		fail("The main thread was interrupted!");
         }
         assertTrue("thread must be alive", t.isAlive());
         t.interrupt();
@@ -298,7 +305,7 @@
             try {
                 t.join(10);
             } catch (Exception e) {
-                fail("The main thread was interrupted!");
+                fail("The main thread was interrupted_2!");
             }
         }
         assertTrue("An InterruptedException must be thrown in test thread!",
@@ -336,8 +343,8 @@
     }
 
     private class TestThread extends Thread {
-        boolean srop = false;
         boolean flag = false;
+        volatile boolean threadStarted = false;
     }
 
     private class TestThread1 extends TestThread {

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_condvar.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_condvar.c?view=diff&rev=478858&r1=478857&r2=478858
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_condvar.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_condvar.c Fri Nov 24 04:30:44
2006
@@ -68,7 +68,7 @@
         // Delegate to OS wait
     apr_status = (!ms && !nano)?
         apr_thread_cond_wait((apr_thread_cond_t*)cond, (apr_thread_mutex_t*)mutex):
-        apr_thread_cond_timedwait ((apr_thread_cond_t*)cond, (apr_thread_mutex_t*)mutex,
ms*1000+ nano / 1000);
+	apr_thread_cond_timedwait ((apr_thread_cond_t*)cond, (apr_thread_mutex_t*)mutex, ms*1000
+ ((nano < 1000) ? 1 : (nano / 1000)));
         
     set_suspend_disable(disable_count);
 



Mime
View raw message