]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fail when spatch can't process source code
authorMichal Nowak <mnowak@isc.org>
Mon, 20 Oct 2025 15:36:36 +0000 (17:36 +0200)
committerMichal Nowak <mnowak@isc.org>
Wed, 22 Oct 2025 11:30:38 +0000 (11:30 +0000)
Sometimes spatch fails to process the source code:

    EXN: Failure("replacement: node 80: {7[1,2,30,31,32] in isc__nm_base64_to_base64url reachable by inconsistent control-flow paths") in ./lib/isc/netmgr/http.c

(cherry picked from commit 44d1a9787045c421d005ce34804489b44a57994c)

util/check-cocci.sh

index 1f749b137a3b6fe076b92870b8b9e4845187845b..9a2cc6ff44ebc4c98e2d5ee05c3a634ac6e82a11 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" cocci.stderr; then
+  if grep -q -e "parse error" -e "EXN: Failure" cocci.stderr; then
     ret=1
   fi
   if [ "$(wc <"$patch" -l)" -gt "0" ]; then