Merge pull request #3528 from BrzVlad/fix-sgen-check-before-collections
[mono.git] / mcs / class / corlib / Test / System.IO / FileStreamTest.cs
index 84a9d638ed6bed978c8f2595ae5e2fd0b9328c4d..b07955903f41a1946e709d8568c1fa42c8c02529 100644 (file)
@@ -25,10 +25,6 @@ namespace MonoTests.System.IO
        {
                string TempFolder = Path.Combine (Path.GetTempPath (), "MonoTests.System.IO.Tests");
                static readonly char DSC = Path.DirectorySeparatorChar;
-               static bool MacOSX = false;
-
-               [DllImport ("libc")]
-               static extern int uname (IntPtr buf);
 
                [TearDown]
                public void TearDown ()
@@ -44,13 +40,6 @@ namespace MonoTests.System.IO
                                Directory.Delete (TempFolder, true);
 
                        Directory.CreateDirectory (TempFolder);
-#if !MOBILE                    
-                       // from XplatUI.cs
-                       IntPtr buf = Marshal.AllocHGlobal (8192);
-                       if (uname (buf) == 0)
-                               MacOSX = Marshal.PtrToStringAnsi (buf) == "Darwin";
-                       Marshal.FreeHGlobal (buf);
-#endif
                }
 
                public void TestCtr ()
@@ -1671,6 +1660,9 @@ namespace MonoTests.System.IO
                        } catch (FileNotFoundException) {
                                // Only run this test on platforms where /dev/zero exists
                                Assert.Ignore();
+                       } catch (DirectoryNotFoundException) {
+                               // Only run this test on platforms where /dev exists
+                               Assert.Ignore();
                        }
 
                        // this shouldn't throw