patch 9.1.0816: tests: not clear what tests cause asan failures

Problem:  tests: not clear what tests cause asan failures
Solution: append testname to $ASAN_OPTIONS

Mention what test causes ASAN failures by appending the testname
to log_path in $ASAN_OPTIONS/$UBSAN_OPTIONS. This assumes 'log_path' is
always the last sub-option in $ASAN_OPTIONS.

While at it, also make the CI run with `-O0` instead of `-O1` when ASAN
is enable since this causes line numbers to disappear.

closes: #15927

Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0496bcd..c1cca40 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -194,9 +194,9 @@
             echo "TEST=unittests"
           fi
           if ${{ contains(matrix.extra, 'asan') }}; then
-            echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
-            echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
-            echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
+            echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
+            echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
+            echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
             echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
           fi
           if ${{ contains(matrix.extra, 'vimtags') }}; then
@@ -304,6 +304,7 @@
         if: contains(matrix.extra, 'asan') && !cancelled()
         run: |
           for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
+            echo "$f"
             asan_symbolize -l "$f"
             false # in order to fail a job
           done