Add REGTESTS_KEEP_LOGS=1 to ASAN-based VTest jobs so test logs are retained
after completion.
Add a new "Show ASAN findings" step that runs only for ASAN builds. This step
searches through the retained test logs for AddressSanitizer SUMMARY lines,
displays any detected issues, and fails the workflow if findings are present.
This improves visibility into memory safety issues detected during regression
testing and ensures ASAN failures don't pass silently in CI.
---
.github/workflows/vtest.yml | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/vtest.yml b/.github/workflows/vtest.yml
index 5129cae3c..ee98dfd3d 100644
--- a/.github/workflows/vtest.yml
+++ b/.github/workflows/vtest.yml
@@ -139,7 +139,25 @@ jobs:
- name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
id: vtest
run: |
- make reg-tests VTEST_PROGRAM=${{ github.workspace }}/vtest/vtest
REGTESTS_TYPES=default,bug,devel
+ make reg-tests VTEST_PROGRAM=${{ github.workspace }}/vtest/vtest ${{
case(contains(matrix.name, 'ASAN'), 'REGTESTS_KEEP_LOGS=1 ', '') }}
REGTESTS_TYPES=default,bug,devel
+ - name: Show ASAN findings
+ if: ${{ contains(matrix.name, 'ASAN') }}
+ run: |
+ found=false
+ for folder in ${TMPDIR:-/tmp}/haregtests-*/vtc.*; do
+ if [ -d "$folder" ]; then
+ if grep -r Sanitizer $folder >/dev/null 2>&1; then
+ found=true
+ printf "::group::"
+ cat $folder/INFO
+ cat $folder/LOG
+ echo "::endgroup::"
+ fi
+ fi
+ done
+ if [ "$found" = true ]; then
+ exit 1;
+ fi
- name: Show VTest results
if: ${{ failure() && steps.vtest.outcome == 'failure' }}
run: |
--
2.46.0.windows.1