[libcxx-commits] [libcxx] c41bda7 - [libcxx] [test] Call create_directory_symlink where relevant

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 10 00:44:12 PST 2020


Author: Martin Storsjö
Date: 2020-11-10T10:39:15+02:00
New Revision: c41bda7f5fc26e4602a029646991d6a5c59cb365

URL: https://github.com/llvm/llvm-project/commit/c41bda7f5fc26e4602a029646991d6a5c59cb365
DIFF: https://github.com/llvm/llvm-project/commit/c41bda7f5fc26e4602a029646991d6a5c59cb365.diff

LOG: [libcxx] [test] Call create_directory_symlink where relevant

Differential Revision: https://reviews.llvm.org/D91072

Added: 
    

Modified: 
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
    libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
index 881643c42265..34dea7243db5 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
@@ -84,7 +84,7 @@ TEST_CASE(not_regular_file) {
   } TestCases[] = {
       {env.create_dir("dir"), std::errc::is_a_directory},
       {env.create_fifo("fifo"), std::errc::not_supported},
-      {env.create_symlink("dir", "sym"), std::errc::is_a_directory}};
+      {env.create_directory_symlink("dir", "sym"), std::errc::is_a_directory}};
 
   for (auto const& TC : TestCases) {
     const path& p = TC.p;

diff  --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
index 679ab5260b95..795c3ce0b302 100644
--- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
@@ -329,7 +329,7 @@ TEST_CASE(test_PR35078_with_symlink)
         env.create_file("dir1/file1"),
         env.create_dir("sym_dir"),
         env.create_dir("sym_dir/nested_sym_dir"),
-        env.create_symlink("sym_dir/nested_sym_dir", "dir1/dir2"),
+        env.create_directory_symlink("sym_dir/nested_sym_dir", "dir1/dir2"),
         env.create_dir("sym_dir/dir1"),
         env.create_dir("sym_dir/dir1/dir2"),
 

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
index 7f0cc3f39811..798c3187eb12 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
@@ -265,7 +265,7 @@ TEST_CASE(test_copy_symlinks_to_symlink_dir)
     const path file2 = env.create_file("file2", 101);
     const path file2_sym = env.create_symlink(file2, "file2_sym");
     const path dir = env.create_dir("dir");
-    const path dir_sym = env.create_symlink(dir, "dir_sym");
+    const path dir_sym = env.create_directory_symlink(dir, "dir_sym");
     {
         std::error_code ec = GetTestEC();
         fs::copy(file1, dir_sym, copy_options::copy_symlinks, ec);

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
index 41d712c7d6fd..fff62c32586b 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
@@ -82,7 +82,7 @@ TEST_CASE(copy_symlink_basic)
 {
     scoped_test_env env;
     const path dir = env.create_dir("dir");
-    const path dir_sym = env.create_symlink(dir, "dir_sym");
+    const path dir_sym = env.create_directory_symlink(dir, "dir_sym");
     const path file = env.create_file("file", 42);
     const path file_sym = env.create_symlink(file, "file_sym");
     { // test for directory symlinks

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
index c206ec1be5ad..3098f33342b0 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
@@ -69,7 +69,7 @@ TEST_CASE(create_directory_symlinks) {
   scoped_test_env env;
   const path root = env.create_dir("dir");
   const path sym_dest_dead = env.make_env_path("dead");
-  const path dead_sym = env.create_symlink(sym_dest_dead, "dir/sym_dir");
+  const path dead_sym = env.create_directory_symlink(sym_dest_dead, "dir/sym_dir");
   const path target = env.make_env_path("dir/sym_dir/foo");
   {
     std::error_code ec = GetTestEC();
@@ -84,7 +84,7 @@ TEST_CASE(create_directory_symlinks) {
 TEST_CASE(create_directory_through_symlinks) {
   scoped_test_env env;
   const path root = env.create_dir("dir");
-  const path sym_dir = env.create_symlink(root, "sym_dir");
+  const path sym_dir = env.create_directory_symlink(root, "sym_dir");
   const path target = env.make_env_path("sym_dir/foo");
   const path resolved_target = env.make_env_path("dir/foo");
   TEST_REQUIRE(is_directory(sym_dir));

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
index 6bf299799f15..2b6467bde539 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
@@ -50,7 +50,7 @@ TEST_CASE(create_directory_symlink_basic)
 {
     scoped_test_env env;
     const path dir = env.create_dir("dir");
-    const path dir_sym = env.create_symlink(dir, "dir_sym");
+    const path dir_sym = env.create_directory_symlink(dir, "dir_sym");
 
     const path dest = env.make_env_path("dest1");
     std::error_code ec;

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
index 74da8cf8f6c7..47ec916a169b 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
@@ -52,7 +52,7 @@ TEST_CASE(create_symlink_basic)
     const path file = env.create_file("file", 42);
     const path file_sym = env.create_symlink(file, "file_sym");
     const path dir = env.create_dir("dir");
-    const path dir_sym = env.create_symlink(dir, "dir_sym");
+    const path dir_sym = env.create_directory_symlink(dir, "dir_sym");
     {
         const path dest = env.make_env_path("dest1");
         std::error_code ec;
@@ -64,7 +64,7 @@ TEST_CASE(create_symlink_basic)
     {
         const path dest = env.make_env_path("dest2");
         std::error_code ec;
-        fs::create_symlink(dir_sym, dest, ec);
+        fs::create_directory_symlink(dir_sym, dest, ec);
         TEST_REQUIRE(!ec);
         TEST_CHECK(is_symlink(dest));
         TEST_CHECK(equivalent(dest, dir));

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
index 15ff08226125..ae9425390308 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
@@ -85,7 +85,7 @@ TEST_CASE(basic_symlink_test)
     } testCases[] = {
         {env.create_symlink(dne, "dne_link"), dne},
         {env.create_symlink(file, "file_link"), file},
-        {env.create_symlink(dir, "dir_link"), dir},
+        {env.create_directory_symlink(dir, "dir_link"), dir},
         {nested_link, link}
     };
     for (auto& TC : testCases) {

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
index cf9deb9ac9f4..8dadf96883a2 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
@@ -112,7 +112,7 @@ TEST_CASE(symlink_to_dir)
     scoped_test_env env;
     const path dir = env.create_dir("dir");
     const path file = env.create_file(dir / "file", 42);
-    const path link = env.create_symlink(dir, "sym");
+    const path link = env.create_directory_symlink(dir, "sym");
 
     {
         std::error_code ec = std::make_error_code(std::errc::address_in_use);
@@ -136,7 +136,7 @@ TEST_CASE(nested_dir)
         env.create_file(dir / "file1", 42),
         env.create_symlink(out_of_dir_file, dir / "sym1"),
         env.create_file(dir1 / "file2", 42),
-        env.create_symlink(dir, dir1 / "sym2")
+        env.create_directory_symlink(dir, dir1 / "sym2")
     };
     const std::size_t expected_count = sizeof(all_files) / sizeof(all_files[0]);
 


        


More information about the libcxx-commits mailing list