From: Colin Vidal Date: Wed, 15 Oct 2025 13:35:59 +0000 (+0200) Subject: check-cocci fails in WARNING is found on stderr X-Git-Tag: v9.21.16~54^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b3bb3eb80d62ce3a226bb675268ff92b4b54ef4;p=thirdparty%2Fbind9.git check-cocci fails in WARNING is found on stderr 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. --- diff --git a/util/check-cocci.sh b/util/check-cocci.sh index 09783ea9af3..f9f7acbbbb2 100755 --- a/util/check-cocci.sh +++ b/util/check-cocci.sh @@ -23,7 +23,7 @@ run_spatch() { echo "Applying semantic patch $spatch..." spatch --jobs "${TEST_PARALLEL_JOBS:-1}" --sp-file "$spatch" --use-gitgrep --dir "." --include-headers $spatchargs >>"$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