[PATCH] Clean up temporary files created by std::filesystem testsuite

Jonathan Wakely jwakely@redhat.com
Tue Nov 27 23:35:00 GMT 2018


	* testsuite/27_io/filesystem/operations/canonical.cc: Remove
	directory created by test.
	* testsuite/27_io/filesystem/operations/symlink_status.cc: Remove
	symlink created by test.

Tested x86_64-linux, committed to trunk.

-------------- next part --------------
commit c981ab59c04fe12ffee89bbfe466a40d66e40268
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 27 23:27:00 2018 +0000

    Clean up temporary files created by std::filesystem testsuite
    
            * testsuite/27_io/filesystem/operations/canonical.cc: Remove
            directory created by test.
            * testsuite/27_io/filesystem/operations/symlink_status.cc: Remove
            symlink created by test.

diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
index f7b6649adfe..6fed419dcc9 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
@@ -36,6 +36,7 @@ test01()
   VERIFY( ec );
 
   create_directory(p);
+  __gnu_test::scoped_file l(p, __gnu_test::scoped_file::adopt_file);
   auto p2 = canonical( p, ec );
   compare_paths( p2, fs::current_path()/p );
   VERIFY( !ec );
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc
index 919f826b957..318a0866e56 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc
@@ -42,6 +42,7 @@ test01()
 
   fs::path link = __gnu_test::nonexistent_path();
   create_directory_symlink(dot, link);
+  __gnu_test::scoped_file l(link, __gnu_test::scoped_file::adopt_file);
 
   st1 = fs::symlink_status(link);
   VERIFY( st1.type() == fs::file_type::symlink );


More information about the Libstdc++ mailing list