From 7d357b299a250ce67f6e7de3d6cbc319ed26f83f Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 7 Jul 2015 12:02:49 +0200 Subject: [PATCH] [tests] Disable on Android due to runtime segfault The Dispose call in FakeSafeHandle causes the Mono runtime to segfault when passing the call up the chain. As a consequence of disabling the base class call, the other tests disabled by this commit fail. --- .../System.Runtime.InteropServices/SafeHandleTest.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs index 4a26c93036c..ed0132cc88b 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs @@ -48,7 +48,10 @@ namespace MonoTests.System.Runtime.InteropServices protected override void Dispose (bool manual) { disposed = true; +#if !MONODROID + // Bombs on Android (ObjectDisposedException) base.Dispose (manual); +#endif } } @@ -77,6 +80,7 @@ namespace MonoTests.System.Runtime.InteropServices [Test] [ExpectedException (typeof (ObjectDisposedException))] + [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue public void BadDispose2 () { FakeSafeHandle sf = new FakeSafeHandle (); @@ -87,6 +91,7 @@ namespace MonoTests.System.Runtime.InteropServices [Test] [ExpectedException (typeof (ObjectDisposedException))] + [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue public void BadDispose3 () { FakeSafeHandle sf = new FakeSafeHandle (); @@ -115,6 +120,7 @@ namespace MonoTests.System.Runtime.InteropServices } [Test] + [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue public void GoodDispose () { int dummyHandle = 0xDEAD; @@ -232,6 +238,7 @@ namespace MonoTests.System.Runtime.InteropServices } [Test] + [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue public void ReleaseAfterDispose1 () { int dummyHandle = 0xDEAD; @@ -260,6 +267,7 @@ namespace MonoTests.System.Runtime.InteropServices [Test] [ExpectedException (typeof (ObjectDisposedException))] + [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue public void ReleaseAfterDispose2 () { FakeSafeHandle sf = new FakeSafeHandle (true); @@ -278,6 +286,7 @@ namespace MonoTests.System.Runtime.InteropServices } [Test] + [Category ("AndroidNotWorking")] // Not until Dispose runtime crasher in FakeSafeHandle is fixed public void NoReleaseUnowned () { FakeSafeHandle sf = new FakeSafeHandle (false); -- 2.25.1