Browse Source

2005-07-07 Zoltan Varga <[email protected]>

	* inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.

svn path=/trunk/mono/; revision=47066
Zoltan Varga 20 years ago
parent
commit
3065adc3ce
2 changed files with 30 additions and 0 deletions
  1. 3 0
      mono/tests/ChangeLog
  2. 27 0
      mono/tests/thread6.cs

+ 3 - 0
mono/tests/ChangeLog

@@ -1,5 +1,8 @@
 2005-07-07  Zoltan Varga  <[email protected]>
 
+	* thread6.cs: Disable part of the test that currently doesn't work. Add
+	new tests from a bug report.
+
 	* appdomain-unload.cs: Add tests for threadpools.
 
 2005-07-04  Raja R Harinath  <[email protected]>

+ 27 - 0
mono/tests/thread6.cs

@@ -25,6 +25,10 @@ public class MultiThreadExceptionTest {
 						// Check that the exception is only rethrown in
 						// the appropriate catch clauses
 
+						// This doesn't work currently, see
+						// http://bugzilla.ximian.com/show_bug.cgi?id=68552
+
+						/*
 						try {
 						}
 						catch {}
@@ -33,6 +37,7 @@ public class MultiThreadExceptionTest {
 						}
 						catch (Exception) {
 						}
+						*/
 						result |= 32;
 
 						// Check that the exception is properly rethrown
@@ -101,7 +106,29 @@ public class MultiThreadExceptionTest {
 		if (result != 59)
 			return 1;
 
+		// Test from #68552
+		try {
+			try {
+				Run ();
+			} catch (Exception ex) {
+			}
+
+			return 2;
+		}
+		catch (ThreadAbortException ex) {
+			Thread.ResetAbort ();
+		}
+
 		return 0;
 	}
+
+	public static void Run ()
+	{
+		try {
+			Thread.CurrentThread.Abort ();
+		} catch (Exception ex) {
+			throw new Exception ("other");
+		}
+	}
 }