From fa3854e43295f71f5dad8557dd621f0f799b0ee0 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 11 Nov 2025 16:59:45 +0100 Subject: [PATCH] test: Remove unused fs::create_directories test The test was added in commit ddb75c2e87a60ed24065bdf0c3bfabf4e058cef1. After the create_directories wrapper removal, the test is redundant with the unit test in the upstream stdlib. Also, there is a Bitcoin Core functional test that covers this behavior in test/functional/feature_dirsymlinks.py So remove this unit test. Finally, I could not find a real system that still ships a buggy stdlib (v11.2) in their package manager. A stand-alone test is also available in compiler-explorer under https://godbolt.org/z/aeMKraYrT. --- src/test/fs_tests.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/test/fs_tests.cpp b/src/test/fs_tests.cpp index 28fcf952e52..89188904b5d 100644 --- a/src/test/fs_tests.cpp +++ b/src/test/fs_tests.cpp @@ -139,28 +139,4 @@ BOOST_AUTO_TEST_CASE(rename) fs::remove(path2); } -#ifndef __MINGW64__ // no symlinks on mingw -BOOST_AUTO_TEST_CASE(create_directories) -{ - // Test fs::create_directories workaround. - const fs::path tmpfolder{m_args.GetDataDirBase()}; - - const fs::path dir{tmpfolder / "a"}; - fs::create_directory(dir); - BOOST_CHECK(fs::exists(dir)); - BOOST_CHECK(fs::is_directory(dir)); - BOOST_CHECK(!fs::create_directories(dir)); - - const fs::path symlink{tmpfolder / "b"}; - fs::create_directory_symlink(dir, symlink); - BOOST_CHECK(fs::exists(symlink)); - BOOST_CHECK(fs::is_symlink(symlink)); - BOOST_CHECK(fs::is_directory(symlink)); - BOOST_CHECK(!fs::create_directories(symlink)); - - fs::remove(symlink); - fs::remove(dir); -} -#endif // __MINGW64__ - BOOST_AUTO_TEST_SUITE_END()