From: Ludovic Henry Date: Mon, 25 Sep 2017 20:38:44 +0000 (-0400) Subject: [Tests] Fail with message in case symlink fails X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=2aace5b6ee7981d481a5d742e740e945c30390a8 [Tests] Fail with message in case symlink fails --- diff --git a/mcs/class/corlib/Test/System.IO/FileTest.cs b/mcs/class/corlib/Test/System.IO/FileTest.cs index 4528027b24e..7e01ce544d7 100644 --- a/mcs/class/corlib/Test/System.IO/FileTest.cs +++ b/mcs/class/corlib/Test/System.IO/FileTest.cs @@ -2709,8 +2709,10 @@ namespace MonoTests.System.IO File.Delete (path2); try { - symlink (path1, path2); - symlink (path2, path1); + if (symlink (path1, path2) != 0) + Assert.Fail ("symlink #1 failed with errno={0}", Marshal.GetLastWin32Error ()); + if (symlink (path2, path1) != 0) + Assert.Fail ("symlink #2 failed with errno={0}", Marshal.GetLastWin32Error ()); Assert.IsTrue (File.Exists (path1), "File.Exists must return true for path1 symlink loop"); Assert.IsTrue (File.Exists (path2), "File.Exists must return true for path2 symlink loop");