projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[tests] Fix assemblyresolve_event4.exe and reference-loader.exe FullAOT test fails
[mono.git]
/
mono
/
tests
/
unhandled-exception-1.cs
diff --git
a/mono/tests/unhandled-exception-1.cs
b/mono/tests/unhandled-exception-1.cs
index 2e89dcffdefd465ae4e120717f838a23a63e2402..90ff5e6162fe270766442bc7fbf64a63b1050d40 100644
(file)
--- a/
mono/tests/unhandled-exception-1.cs
+++ b/
mono/tests/unhandled-exception-1.cs
@@
-12,6
+12,9
@@
class Driver
/* Expected exit code: 1 */
static void Main (string[] args)
{
/* Expected exit code: 1 */
static void Main (string[] args)
{
+ if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null)
+ AppDomain.CurrentDomain.UnhandledException += (s, e) => {};
+
ManualResetEvent mre = new ManualResetEvent (false);
var t = new Thread (new ThreadStart (() => { try { throw new CustomException (); } finally { mre.Set (); } }));
ManualResetEvent mre = new ManualResetEvent (false);
var t = new Thread (new ThreadStart (() => { try { throw new CustomException (); } finally { mre.Set (); } }));
@@
-20,7
+23,9
@@
class Driver
if (!mre.WaitOne (5000))
Environment.Exit (2);
if (!mre.WaitOne (5000))
Environment.Exit (2);
- t.Join ();
+ /* Give a chance to the thread to finish executing the exception unwinding
+ * after the finally, before we exit with status 0 on the current thread */
+ Thread.Sleep (1000);
Environment.Exit (0);
}
Environment.Exit (0);
}