This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a commit to branch test_msys2_ucrt-x86_64 in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit c7fa9f54b4ae51a05d6a1cf9c0264ca6d922c154 Author: Stephen Webb <[email protected]> AuthorDate: Tue Oct 15 16:40:05 2024 +1100 Capture stack trace when ucrt-x86_64 asyncappendertestcase blocks --- .github/workflows/test-msys2-ucrt.yml | 85 +++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/.github/workflows/test-msys2-ucrt.yml b/.github/workflows/test-msys2-ucrt.yml new file mode 100644 index 00000000..466701c7 --- /dev/null +++ b/.github/workflows/test-msys2-ucrt.yml @@ -0,0 +1,85 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: test-msys2-ucrt + +on: [workflow_dispatch] + +jobs: + job: + name: ${{ matrix.env }}-${{ matrix.cxx }}-asyncappender-multithreading + runs-on: windows-2022 + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + name: [ ucrt64-clang, ucrt64-gnu ] + include: + - name: ucrt64-clang + sys: ucrt64 + env: ucrt-x86_64 + compiler-package: clang + cxx: clang++ + - name: ucrt64-gnu + sys: ucrt64 + env: ucrt-x86_64 + compiler-package: gcc + cxx: g++ + + steps: + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + update: true + install: >- + git + mingw-w64-${{ matrix.env }}-${{ matrix.compiler-package }} + mingw-w64-${{ matrix.env }}-ccmake + mingw-w64-${{ matrix.env }}-ninja + mingw-w64-${{ matrix.env }}-apr-util + sed + zip + mingw-w64-${{ matrix.env }}-gdb + + - uses: actions/checkout@v4 + with: + persist-credentials: false # do not persist auth token in the local git config + path: log4cxx + + - name: 'configure and build' + shell: msys2 {0} + run: | + cmake -G Ninja -S log4cxx -B log4cxx/build -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_BUILD_TYPE=Debug + cmake --build log4cxx/build -t asyncappendertestcase.exe + + - name: 'test asyncappender multithreading' + shell: msys2 {0} + run: | + cd log4cxx/build + export PATH=`pwd`/src/main/cpp:$PATH + test_exe=`pwd`/src/test/cpp/asyncappendertestcase.exe + for i in {1..15} + do + $test_exe testMultiThread & + test_pid=$! + sleep 2s + if ps -p $test_pid > /dev/null; then + gdb $test_exe --pid=$test_pid <<EOT + info threads + thread apply all backtrace + EOT + kill $test_pid + break + fi + done
