Skip to content

Commit c47d99d

Browse files
committed
CI: preserve and report ASan findings in regression tests
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.
1 parent 249e6cb commit c47d99d

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/vtest.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,25 @@ jobs:
139139
- name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
140140
id: vtest
141141
run: |
142-
make reg-tests VTEST_PROGRAM=${{ github.workspace }}/vtest/vtest REGTESTS_TYPES=default,bug,devel
142+
make reg-tests VTEST_PROGRAM=${{ github.workspace }}/vtest/vtest ${{ case(contains(matrix.name, 'ASAN'), 'REGTESTS_KEEP_LOGS=1 ', '') }} REGTESTS_TYPES=default,bug,devel
143+
- name: Show ASAN findings
144+
if: ${{ contains(matrix.name, 'ASAN') }}
145+
run: |
146+
found=false
147+
for folder in ${TMPDIR:-/tmp}/haregtests-*/vtc.*; do
148+
if [ -d "$folder" ]; then
149+
if grep -r Sanitizer $folder >/dev/null 2>&1; then
150+
found=true
151+
printf "::group::"
152+
cat $folder/INFO
153+
cat $folder/LOG
154+
echo "::endgroup::"
155+
fi
156+
fi
157+
done
158+
if [ "$found" = true ]; then
159+
exit 1;
160+
fi
143161
- name: Show VTest results
144162
if: ${{ failure() && steps.vtest.outcome == 'failure' }}
145163
run: |

0 commit comments

Comments
 (0)