test: Remove unused fs::create_directories test
What changed, and why it matters
This commit simply deletes a unit test that is no longer needed. It does not change any production code, so it cannot introduce or fix a security vulnerability on its own.
No security action needed. Reviewers may want to confirm that the functional test feature_dirsymlinks.py still covers the relevant directory/symlink behavior, which the commit message already states.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes the BOOST_AUTO_TEST_CASE(create_directories) test from src/test/fs_tests.cpp. The removed test exercised the old Bitcoin Core fs::create_directories wrapper behavior with real directories and directory symlinks. That wrapper has already been removed, so the test is redundant with the standard library’s own unit tests and with the functional test feature_dirsymlinks.py. No runtime or consensus code is modified.
Changed components
src/test/fs_tests.cppInspect captured patch +0 / −24
diff --git a/src/test/fs_tests.cpp b/src/test/fs_tests.cpp
index 28fcf952..89188904 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()
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.