[kaffe] Re: flestmail - daily - 365/365 passed (100.0%) (0 errors, 0 failures)

Patrick Tullmann tullmann at cs.utah.edu
Tue Sep 3 16:28:02 PDT 2002


I wrote:
> But, I think its having problems because Kaffe is hanging in the
> ThreadInterrupt test.  There is a ThreadInterrupt.fail in both intrp
> trees that contains only:
> 
> 	Success 0a.

Yep, this is consistently repeatable on my Linux/x86 box (with intrp-debug).

The attached patch should move the watchdog timer to cover the whole
test (instead of just sub-tests 4 + 5).  Hopefully this will at least
prevent the indefinite hangs in the testsuite...  Since I can
reproduce it here, I'll look into it a bit more and see if the traces
say anything...

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                           www.tullmann.org

Index: ThreadInterrupt.java
===================================================================
RCS file: /cvs/kaffe/kaffe/test/regression/ThreadInterrupt.java,v
retrieving revision 1.3
diff -u -b -u -r1.3 ThreadInterrupt.java
--- ThreadInterrupt.java	12 Feb 1999 13:51:11 -0000	1.3
+++ ThreadInterrupt.java	3 Sep 2002 23:18:56 -0000
@@ -9,8 +9,19 @@
 
 public class ThreadInterrupt {
     public static void main(String av[]) throws Exception {
+	Thread watchdog = new Thread() {
+	    public void run() {
+		try {
+		    Thread.sleep(180 * 1000); // 3 minutes should be sufficient
+		} catch (InterruptedException _) { }
+		System.out.println("Failure! Watchdog timed out.");
+		System.exit(-1);
+	    }
+	};
+	watchdog.start();
+
 	Thread t;
-	t = new Thread() {
+	t = new Thread("Interrupt-in-wait") {
 	    public void run() {
 		synchronized(this) {
 		    try {
@@ -28,7 +39,7 @@
 	    }
 	};
 	ssij(t);
-	t = new Thread() {
+	t = new Thread("Interrupt-in-sleep") {
 	    public void run() {
 		try {
 		    Thread.sleep(5000);
@@ -44,7 +55,7 @@
 	    }
 	};
 	ssij(t);
-	t = new Thread() {
+	t = new Thread("Test-interrupt-post catch") {
 	    public void run() {
 		synchronized (this) {
 		    try {
@@ -90,16 +101,6 @@
 	    System.out.println("Success 3.");
 	}
 	t.join();
-	Thread watchdog = new Thread() {
-	    public void run() {
-		try {
-		    Thread.sleep(3000);
-		} catch (InterruptedException _) { }
-		System.out.println("Failure 4/5.:   Time out.");
-		System.exit(-1);
-	    }
-	};
-	watchdog.start();
 
 	Thread me = Thread.currentThread();
 	me.interrupt();




More information about the kaffe mailing list