This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3 patch] Fix FAIL in experimental/filesystem/operations/

This test is failing on Darwin, it turns out to be because TMPDIR is
set to a symlink, so after changing to that directory current_path()
returns a different path. We should canonicalize the paths before
comparing them.

Tested x86_64-linux, committed to trunk.

commit 4948553fcf04e6d3255d6c440bfc82aac71cfbe3
Author: Jonathan Wakely <>
Date:   Thu Jul 30 13:32:15 2015 +0100

    	* testsuite/experimental/filesystem/operations/ Use
    	canonical paths for comparisons.

diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/ b/libstdc++-v3/testsuite/experimental/filesystem/operations/
index 325a5a8..c242ac0 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/
@@ -42,11 +42,11 @@ test02()
   auto oldwd = fs::current_path();
   auto tmpdir = fs::temp_directory_path();
-  VERIFY( fs::current_path() == tmpdir );
+  VERIFY( canonical(fs::current_path()) == canonical(tmpdir) );
   std::error_code ec;
   current_path(oldwd, ec);
-  VERIFY( fs::current_path() == oldwd );
-  VERIFY( fs::current_path(ec) == oldwd );
+  VERIFY( canonical(fs::current_path()) == canonical(oldwd) );
+  VERIFY( canonical(fs::current_path(ec)) == canonical(oldwd) );

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]