From f00a212cb89cf2cc57e9d5bc41078e99815f8a87 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Fri, 19 May 2023 10:03:22 +0200 Subject: [PATCH] TSAN summarising line was misplaced in run.sh The line summarising TSAN reports was misplaced in the ASAN territory and thus never used. I also made core dumps, assertion failures, and TSAN reports detection independent of each other. (cherry picked from commit 0c4c7ddec446d3ea8d079855fe9ee514eefeba72) --- bin/tests/system/run.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh index 650ae7f974..3384397d82 100755 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh @@ -276,11 +276,8 @@ get_core_dumps() { } core_dumps=$(get_core_dumps | tr '\n' ' ') -assertion_failures=$(find "$systest/" -name named.run -exec grep "assertion failure" {} + | wc -l) -sanitizer_summaries=$(find "$systest/" -name 'tsan.*' | wc -l) if [ -n "$core_dumps" ]; then echoinfo "I:$systest:Core dump(s) found: $core_dumps" - echofail "R:$systest:FAIL" get_core_dumps | while read -r coredump; do SYSTESTDIR="$systest" echoinfo "D:$systest:backtrace from $coredump:" @@ -308,17 +305,23 @@ if [ -n "$core_dumps" ]; then gzip -1 "${coredump}" done status=$((status+1)) -elif [ "$assertion_failures" -ne 0 ]; then +fi + +assertion_failures=$(find "$systest/" -name named.run -exec grep "assertion failure" {} + | wc -l) +if [ "$assertion_failures" -ne 0 ]; then SYSTESTDIR="$systest" echoinfo "I:$systest:$assertion_failures assertion failure(s) found" + status=$((status+1)) +fi + +tsan_failures=$(find "$systest/" -name 'tsan.*' | wc -l) +if [ "$tsan_failures" -ne 0 ]; then + echoinfo "I:$systest:$tsan_failures sanitizer report(s) found" find "$systest/" -name 'tsan.*' -exec grep "SUMMARY: " {} + | sort -u | cat_d - echofail "R:$systest:FAIL" status=$((status+1)) -elif [ "$sanitizer_summaries" -ne 0 ]; then - echoinfo "I:$systest:$sanitizer_summaries sanitizer report(s) found" - echofail "R:$systest:FAIL" - status=$((status+1)) -elif [ "$status" -ne 0 ]; then +fi + +if [ "$status" -ne 0 ]; then echofail "R:$systest:FAIL" else echopass "R:$systest:PASS"