]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TSAN summarising line was misplaced in get_core_dumps.sh
authorMichal Nowak <mnowak@isc.org>
Wed, 26 Apr 2023 10:48:40 +0000 (12:48 +0200)
committerMichal Nowak <mnowak@isc.org>
Fri, 19 May 2023 06:57:36 +0000 (08:57 +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.

bin/tests/system/get_core_dumps.sh

index 5d0255a2fd1aeb36a5b1749f7ea0c238fddba349..8270b410d9fe4f1e4a0b7d4ba88965b4fde2ec53 100755 (executable)
@@ -24,8 +24,6 @@ get_core_dumps() {
 }
 
 core_dumps=$(get_core_dumps | tr '\n' ' ')
-assertion_failures=$(find "$SYSTESTDIR/" -name named.run -exec grep "assertion failure" {} + | wc -l)
-sanitizer_summaries=$(find "$SYSTESTDIR/" -name 'tsan.*' | wc -l)
 if [ -n "$core_dumps" ]; then
     status=1
     echoinfo "I:$systest:Core dump(s) found: $core_dumps"
@@ -54,13 +52,19 @@ if [ -n "$core_dumps" ]; then
         echoinfo "D:$systest:core dump $coredump archived as $coredump.gz"
         gzip -1 "${coredump}"
     done
-elif [ "$assertion_failures" -ne 0 ]; then
+fi
+
+assertion_failures=$(find "$SYSTESTDIR/" -name named.run -exec grep "assertion failure" {} + | wc -l)
+if [ "$assertion_failures" -ne 0 ]; then
     status=1
     echoinfo "I:$systest:$assertion_failures assertion failure(s) found"
-    find "$SYSTESTDIR/" -name 'tsan.*' -exec grep "SUMMARY: " {} + | sort -u | cat_d
-elif [ "$sanitizer_summaries" -ne 0 ]; then
+fi
+
+tsan_failures=$(find "$SYSTESTDIR/" -name 'tsan.*' | wc -l)
+if [ "$tsan_failures" -ne 0 ]; then
     status=1
-    echoinfo "I:$systest:$sanitizer_summaries sanitizer report(s) found"
+    echoinfo "I:$systest:$tsan_failures TSAN sanitizer report(s) found"
+    find "$SYSTESTDIR/" -name 'tsan.*' -exec grep "SUMMARY: " {} + | sort -u | cat_d
 fi
 
 exit $status