diff mbox series

[committed] libstdc++: Clear up directories created by tests

Message ID 20210209165506.GA769658@redhat.com
State New
Headers show
Series [committed] libstdc++: Clear up directories created by tests | expand

Commit Message

Jonathan Wakely Feb. 9, 2021, 4:55 p.m. UTC
libstdc++-v3/ChangeLog:

	* testsuite/27_io/filesystem/operations/remove_all.cc: Remove
	test directory after making it writable again.
	* testsuite/experimental/filesystem/operations/remove_all.cc:
	Likewise.

Tested x86_64-linux. Committed to trunk.
commit bfdb7b8c6f54807789471705a8fcd03bab3d7fc3
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Feb 9 16:53:56 2021

    libstdc++: Clear up directories created by tests
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/27_io/filesystem/operations/remove_all.cc: Remove
            test directory after making it writable again.
            * testsuite/experimental/filesystem/operations/remove_all.cc:
            Likewise.
diff mbox series

Patch

diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
index ee16d67debd..986a8dfb2ae 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
@@ -171,6 +171,8 @@  test04()
   }
 
   fs::permissions(dir, fs::perms::owner_write, fs::perm_options::add);
+  fs::remove_all(dir, ec);
+  f.path.clear();
 #endif
 }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
index 9aca6c8af67..87fd2dde41d 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
@@ -137,6 +137,8 @@  test04()
   }
 
   fs::permissions(dir, fs::perms::owner_write|fs::perms::add_perms);
+  fs::remove_all(dir, ec);
+  f.path.clear();
 #endif
 }