]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TSAN summarising line was misplaced in run.sh
authorMichal Nowak <mnowak@isc.org>
Fri, 19 May 2023 08:03:22 +0000 (10:03 +0200)
committerMichal Nowak <mnowak@isc.org>
Fri, 19 May 2023 12:55:23 +0000 (14:55 +0200)
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

index 650ae7f9742982bdf60cc8f9f0bb7b925a7a6b7f..3384397d8275d2595efc843bf2e8f0248365524b 100755 (executable)
@@ -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"
-    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"
+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
     status=$((status+1))
-elif [ "$status" -ne 0 ]; then
+fi
+
+if [ "$status" -ne 0 ]; then
     echofail "R:$systest:FAIL"
 else
     echopass "R:$systest:PASS"