From: Michal Nowak Date: Mon, 20 Oct 2025 15:36:36 +0000 (+0200) Subject: Fail when spatch can't process source code X-Git-Tag: v9.21.15~46^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44d1a9787045c421d005ce34804489b44a57994c;p=thirdparty%2Fbind9.git Fail when spatch can't process source code 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 --- diff --git a/util/check-cocci.sh b/util/check-cocci.sh index 5dd382c6ad5..09783ea9af3 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" 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