]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check-cocci fails in WARNING is found on stderr
authorColin Vidal <colin@isc.org>
Wed, 15 Oct 2025 13:35:59 +0000 (15:35 +0200)
committerColin Vidal (GitLab job 6470718) <colin@isc.org>
Wed, 12 Nov 2025 10:32:20 +0000 (10:32 +0000)
As the implicit cast check print "WARNING: ..." on stderr, add a pattern
to make sure that check-cocci would fails if such warning is found on
stderr. This is generic (not specific like the existing "parse error")
so it should be able to support future Coccinelle spatch warnings.

(cherry picked from commit 3b3bb3eb80d62ce3a226bb675268ff92b4b54ef4)

util/check-cocci.sh

index 9a2cc6ff44ebc4c98e2d5ee05c3a634ac6e82a11..250aef152e15dfa1495fc4519e199f51813bd13b 100755 (executable)
@@ -18,7 +18,7 @@ for spatch in cocci/*.spatch; do
   echo "Applying semantic patch $spatch..."
   spatch --jobs "${TEST_PARALLEL_JOBS:-1}" --sp-file "$spatch" --use-gitgrep --dir "." --very-quiet --include-headers "$@" >>"$patch" 2>cocci.stderr
   cat cocci.stderr
-  if grep -q -e "parse error" -e "EXN: Failure" cocci.stderr; then
+  if grep -q -e "parse error" -e "EXN: Failure" -e "WARNING" cocci.stderr; then
     ret=1
   fi
   if [ "$(wc <"$patch" -l)" -gt "0" ]; then