diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-07-03 22:01:33 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-07-03 22:01:33 +0300 |
commit | 07068de54ae723c8e4e3d9c91fde97ee378ccad2 (patch) | |
tree | bcff368469c1a05a9b87bef84f0ce30a860eeb33 | |
parent | cfe08ab0630f277b0c7d8f749c1cbca3172bb808 (diff) |
Yet more travis and appveyor bashing
-rw-r--r-- | .travis.yml | 27 | ||||
-rw-r--r-- | include/llfio/v2.0/detail/impl/posix/fs_handle.ipp | 2 | ||||
-rw-r--r-- | include/llfio/v2.0/detail/impl/reduce.ipp | 3 | ||||
-rw-r--r-- | test/tests/path_view.cpp | 5 | ||||
-rw-r--r-- | test/tests/process_handle.cpp | 28 |
5 files changed, 38 insertions, 27 deletions
diff --git a/.travis.yml b/.travis.yml index 3f8ca011..b1de8163 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ addons: # sources: # - sourceline: "ppa:ubuntu-toolchain-r/test" packages: - - g++-8 + - g++ - clang - g++-arm-linux-gnueabihf - python3 @@ -35,8 +35,8 @@ env: matrix: include: - - name: "g++ 8.4 x64 cmake tests (error_code)" - compiler: g++-8 + - name: "g++ 7.5 x64 cmake tests (error_code)" + compiler: g++ os: linux env: NAME=x64_EC_tests - name: "clang++ 7.0 x64 cmake tests (error_code)" @@ -54,8 +54,8 @@ matrix: os: osx osx_image: xcode11.6 env: NAME=x64_EC_tests - - name: "g++ 8.4 x64 cmake tests (status_code)" - compiler: g++-8 + - name: "g++ 7.5 x64 cmake tests (status_code)" + compiler: g++ os: linux env: - NAME=x64_SC_tests @@ -93,8 +93,8 @@ matrix: compiler: clang++ os: linux env: NAME=Documentation - - name: "g++ 8.4 x64 Programs (error_code)" - compiler: g++-8 + - name: "g++ 7.5 x64 Programs (error_code)" + compiler: g++ os: linux env: NAME=x64_EC_programs - name: "clang++ 7.0 x64 Programs (error_code)" @@ -120,8 +120,8 @@ matrix: # env: # - NAME=x64_SC_programs # - CMAKE_CONFIGURE_OPTIONS=-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON - - name: "g++ 8.4 Installability (error_code)" - compiler: g++-8 + - name: "g++ 7.5 Installability (error_code)" + compiler: g++ os: linux env: NAME=x64_EC_install - name: "clang++ 7.0 Installability (error_code)" @@ -139,8 +139,8 @@ matrix: os: osx osx_image: xcode11.6 env: NAME=x64_EC_install - - name: "g++ 8.4 Installability (status_code)" - compiler: g++-8 + - name: "g++ 7.5 Installability (status_code)" + compiler: g++ os: linux env: - NAME=x64_SC_install @@ -166,9 +166,6 @@ matrix: # - CMAKE_CONFIGURE_OPTIONS=-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON before_install: - - if [ "$TRAVIS_COMPILER" = "g++-8" ]; then - export CXX=g++-8; - fi - if [ "$TRAVIS_COMPILER" = "clang++-10" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -; echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" >> /etc/apt/sources.list; @@ -236,7 +233,7 @@ script: after_success: # - bash -x ./update_coveralls.sh `pwd` # - NEWNAME=llfio-v2.0-binaries-linux64-$(date +%Y%m%d%H%M%S).tgz - - if [ "$NAME" = "linux_g++-8_x64_EC_tests" ]; then + - if [ "$NAME" = "linux_g++_x64_EC_tests" ]; then NEWNAME=llfio-v2.0-binaries-linux64-$TRAVIS_COMMIT.tgz; mv llfio-v2.0-binaries-linux-x64.tgz $NEWNAME; curl -T $NEWNAME -u jenkins-nedprod:$JENKINS_NEDPROD_PASSWORD https://dedi5.nedprod.com/static/files/upload/; diff --git a/include/llfio/v2.0/detail/impl/posix/fs_handle.ipp b/include/llfio/v2.0/detail/impl/posix/fs_handle.ipp index 5fbda855..5e936068 100644 --- a/include/llfio/v2.0/detail/impl/posix/fs_handle.ipp +++ b/include/llfio/v2.0/detail/impl/posix/fs_handle.ipp @@ -267,9 +267,7 @@ result<void> fs_handle::unlink(deadline d) noexcept { OUTCOME_TRY(_fetch_inode()); } - fprintf(stderr, "travis debug unlink(): just before containing_directory\n"); OUTCOME_TRY(auto &&dirh, detail::containing_directory(std::ref(filename), h, *this, d)); - fprintf(stderr, "travis debug unlink(): just before unlinkat '%s'\n", filename.c_str()); if(-1 == ::unlinkat(dirh.native_handle().fd, filename.c_str(), h.is_directory() ? AT_REMOVEDIR : 0)) { return posix_error(); diff --git a/include/llfio/v2.0/detail/impl/reduce.ipp b/include/llfio/v2.0/detail/impl/reduce.ipp index c243386d..22fed9e5 100644 --- a/include/llfio/v2.0/detail/impl/reduce.ipp +++ b/include/llfio/v2.0/detail/impl/reduce.ipp @@ -150,6 +150,7 @@ namespace algorithm return success(); } } + fprintf(stderr, "travis debug reduce(): remove of '%s' fails\n", zpath.buffer); return posix_error(); } return success(); @@ -241,6 +242,7 @@ namespace algorithm return success(); } } + fprintf(stderr, "travis debug reduce(): rename of '%s' fails\n", zpath.buffer); return posix_error(); #endif } @@ -391,6 +393,7 @@ 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"); diff --git a/test/tests/path_view.cpp b/test/tests/path_view.cpp index a0488b5e..51dd6bc9 100644 --- a/test/tests/path_view.cpp +++ b/test/tests/path_view.cpp @@ -188,6 +188,11 @@ static inline void TestPathView() BOOST_CHECK(llfio::path_view(L"\\\\.\\niall").is_absolute()); // On Windows this is relative, on POSIX it is absolute BOOST_CHECK(llfio::path_view("/niall").is_relative()); + + // This was segfaulting on Appveyor + 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; #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 204d5822..1ddf26e5 100644 --- a/test/tests/process_handle.cpp +++ b/test/tests/process_handle.cpp @@ -28,37 +28,43 @@ Distributed under the Boost Software License, Version 1.0. #include "../test_kernel_decl.hpp" -static inline void TestProcessHandle(bool with_redirection) { +static inline void TestProcessHandle(bool with_redirection) +{ namespace llfio = LLFIO_V2_NAMESPACE; std::vector<llfio::process_handle> children; auto &self = llfio::process_handle::current(); auto myexepath = self.current_path().value(); std::cout << "My process executable's path is " << myexepath << std::endl; auto myenv = self.environment(); - fprintf(stderr, "appveyor debug environment(): just after environment, it returned %p\n", myenv.get()); std::cout << "My process environment contains:"; if(myenv) { for(auto &i : *myenv) { - visit(i, [](auto sv) { fwprintf(stderr, L"appveyor debug environment(): about to cout '%s'\n", (wchar_t *) sv.data()); }); - std::cout << "\n " << i; + if(visit(i, [](auto sv) -> bool { + 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"); + return (sv.npos == sv.find(a)) && (sv.npos == sv.find(b)); + })) + { + std::cout << "\n " << i; + } } } - fprintf(stderr, "appveyor debug environment(): just after iteration\n"); std::cout << "\n" << std::endl; - fprintf(stderr, "appveyor debug environment(): just before launch process setup\n"); llfio::process_handle::flag flags = llfio::process_handle::flag::wait_on_close; if(!with_redirection) { flags |= llfio::process_handle::flag::no_redirect; } - for(size_t n=0; n<4; n++) + for(size_t n = 0; n < 4; n++) { char buffer[64]; sprintf(buffer, "--testchild,%u", (unsigned) n); llfio::path_view_component arg(buffer); - fprintf(stderr, "appveyor debug environment(): just before launch process %u\n", (unsigned) n); children.push_back(llfio::process_handle::launch_process(myexepath, {&arg, 1}, flags).value()); } if(with_redirection) @@ -80,8 +86,10 @@ static inline void TestProcessHandle(bool with_redirection) { } } -KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, no_redirect, "Tests that llfio::process_handle without redirection works as expected", TestProcessHandle(false)) -KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, redirect, "Tests that llfio::process_handle with redirection works as expected", TestProcessHandle(true)) +KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, no_redirect, "Tests that llfio::process_handle without redirection works as expected", + TestProcessHandle(false)) +KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, redirect, "Tests that llfio::process_handle with redirection works as expected", + TestProcessHandle(true)) int main(int argc, char *argv[]) { |