From 2aace5b6ee7981d481a5d742e740e945c30390a8 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 25 Sep 2017 16:38:44 -0400 Subject: [PATCH] [Tests] Fail with message in case symlink fails --- mcs/class/corlib/Test/System.IO/FileTest.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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"); -- 2.25.1