diff options
-rw-r--r-- | include/llfio/revision.hpp | 6 | ||||
-rw-r--r-- | include/llfio/v2.0/detail/impl/reduce.ipp | 13 | ||||
-rw-r--r-- | test/tests/path_view.cpp | 4 | ||||
-rw-r--r-- | test/tests/process_handle.cpp | 4 |
4 files changed, 11 insertions, 16 deletions
diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp index 1e525190..bafbaa31 100644 --- a/include/llfio/revision.hpp +++ b/include/llfio/revision.hpp @@ -1,4 +1,4 @@ // Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time -#define LLFIO_PREVIOUS_COMMIT_REF 84c669a7c4027856959cee098d5c0e95b7643f17 -#define LLFIO_PREVIOUS_COMMIT_DATE "2020-06-25 23:44:40 +00:00" -#define LLFIO_PREVIOUS_COMMIT_UNIQUE 84c669a7 +#define LLFIO_PREVIOUS_COMMIT_REF 07068de54ae723c8e4e3d9c91fde97ee378ccad2 +#define LLFIO_PREVIOUS_COMMIT_DATE "2020-07-03 19:01:39 +00:00" +#define LLFIO_PREVIOUS_COMMIT_UNIQUE 07068de5 diff --git a/include/llfio/v2.0/detail/impl/reduce.ipp b/include/llfio/v2.0/detail/impl/reduce.ipp index 22fed9e5..7612e7ea 100644 --- a/include/llfio/v2.0/detail/impl/reduce.ipp +++ b/include/llfio/v2.0/detail/impl/reduce.ipp @@ -150,7 +150,6 @@ namespace algorithm return success(); } } - fprintf(stderr, "travis debug reduce(): remove of '%s' fails\n", zpath.buffer); return posix_error(); } return success(); @@ -241,9 +240,9 @@ namespace algorithm { return success(); } + return posix_error(); } - fprintf(stderr, "travis debug reduce(): rename of '%s' fails\n", zpath.buffer); - return posix_error(); + return success(); #endif } struct reduction_state @@ -291,7 +290,7 @@ namespace algorithm if(r) { state->items_removed.fetch_add(1, std::memory_order_relaxed); - entry = {}; // prevent traversal + entry.stat = stat_t(nullptr); // prevent traversal } else { @@ -379,11 +378,9 @@ namespace algorithm } size_t round = 0; detail::reduction_state state(topdirh, visitor); - fprintf(stderr, "travis debug reduce(): just before first traverse\n"); OUTCOME_TRY(traverse(topdirh, visitor, threads, &state, force_slow_path)); auto not_removed = state.directory_open_failed.load(std::memory_order_relaxed) + state.failed_to_remove.load(std::memory_order_relaxed) + state.failed_to_rename.load(std::memory_order_relaxed); - fprintf(stderr, "travis debug reduce(): just after first traverse, not_removed=%u\n", (unsigned) not_removed); OUTCOME_TRY(visitor->reduction_round(&state, round++, state.items_removed.load(std::memory_order_relaxed), not_removed)); while(not_removed > 0) { @@ -393,16 +390,12 @@ namespace algorithm OUTCOME_TRY(traverse(topdirh, visitor, (round > 16) ? 1 : threads, &state, force_slow_path)); not_removed = state.directory_open_failed.load(std::memory_order_relaxed) + state.failed_to_remove.load(std::memory_order_relaxed) + state.failed_to_rename.load(std::memory_order_relaxed); - fprintf(stderr, "travis debug reduce(): round %u, not_removed=%u\n", (unsigned) round, (unsigned) not_removed); OUTCOME_TRY(visitor->reduction_round(&state, round++, state.items_removed.load(std::memory_order_relaxed), not_removed)); } - fprintf(stderr, "travis debug reduce(): just before topdirh unlink\n"); OUTCOME_TRY(topdirh.unlink()); - fprintf(stderr, "travis debug reduce(): just after topdirh unlink\n"); state.items_removed.fetch_add(1, std::memory_order_relaxed); // If we successfully unlinked it, move the directory in here, and close it. auto _topdirh(std::move(topdirh)); - fprintf(stderr, "travis debug reduce(): just before topdirh close\n"); OUTCOME_TRY(_topdirh.close()); return state.items_removed; } diff --git a/test/tests/path_view.cpp b/test/tests/path_view.cpp index 51dd6bc9..f8f40da2 100644 --- a/test/tests/path_view.cpp +++ b/test/tests/path_view.cpp @@ -189,10 +189,12 @@ static inline void TestPathView() // On Windows this is relative, on POSIX it is absolute BOOST_CHECK(llfio::path_view("/niall").is_relative()); - // This was segfaulting on Appveyor +// This fails on VS2017 for no obvious reason +#if _MSC_VER >= 1920 llfio:: path_view_component longthing(LR"(Path=C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;C:\Tools\GitVersion;C:\Tools\NuGet;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\PsTools;C:\Program Files\Git LFS;C:\Program Files\Mercurial\;C:\Program Files (x86)\Subversion\bin;C:\Tools\WebDriver;C:\Tools\Coverity\bin;C:\Tools\MSpec;C:\Tools\NUnit\bin;C:\Tools\NUnit3;C:\Tools\xUnit;C:\Program Files\nodejs;C:\Program Files (x86)\iojs;C:\Program Files\iojs;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Ruby193\bin;C:\go\bin;C:\Program Files\Java\jdk1.8.0\bin;C:\Program Files (x86)\Apache\Maven\bin;C:\Python27;C:\Python27\Scripts;C:\Program Files (x86)\CMake\bin;C:\Tools\curl\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130;C:\Program Files\dotnet\;C:\Tools\vcpkg;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\TestPlatform;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\erl9.2\bin;C:\Program Files (x86)\NSIS;C:\Tools\Octopus;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Docker\Docker\resources;C:\Program Files\LLVM\bin;C:\Users\appveyor\AppData\Roaming\npm;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\PowerShell\6\;C:\Program Files (x86)\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\Meson\;C:\ProgramData\chocolatey\bin;C:\Program Files\Amazon\AWSCLI\;C:\Program Files (x86)\Yarn\bin\;C:\Users\appveyor\AppData\Local\Microsoft\WindowsApps;C:\Users\appveyor\.dotnet\tools;C:\Users\appveyor\AppData\Roaming\npm;C:\Users\appveyor\AppData\Local\Yarn\bin;C:\Program Files\AppVeyor\BuildAgent\)"); std::cout << "A very long path component is " << longthing << std::endl; +#endif #else BOOST_CHECK(llfio::path_view("/niall").is_absolute()); #endif diff --git a/test/tests/process_handle.cpp b/test/tests/process_handle.cpp index 1ddf26e5..5aff5eb1 100644 --- a/test/tests/process_handle.cpp +++ b/test/tests/process_handle.cpp @@ -45,8 +45,8 @@ static inline void TestProcessHandle(bool with_redirection) if(sv.size() >= 512) return false; using _string_view = std::decay_t<decltype(sv)>; - _string_view a((const _string_view::value_type *) "JENKINS_NEDPROD_PASSWORD"); - _string_view b((const _string_view::value_type *) L"JENKINS_NEDPROD_PASSWORD"); + _string_view a((const typename _string_view::value_type *) "JENKINS_NEDPROD_PASSWORD"); + _string_view b((const typename _string_view::value_type *) L"JENKINS_NEDPROD_PASSWORD"); return (sv.npos == sv.find(a)) && (sv.npos == sv.find(b)); })) { |