From patchwork Mon Sep 7 18:17:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5325 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:57cc:b0:899:8fd4:d065 with SMTP id v12csp847830mau; Mon, 7 Sep 2026 11:18:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBwgI5U5/60twRn4g5W4l2UxpzifP28lqsgWy7kaYaNPERDR67DSOtNmPUqdmIZoC0TdY8yLsFC6nvk=@openvpn.net X-Received: by 2002:a05:6820:988:b0:6b5:ec2f:3576 with SMTP id 006d021491bc7-6b5ec2f370fmr10212091eaf.39.1788805089908; Mon, 07 Sep 2026 11:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788805089; cv=none; d=google.com; s=arc-20260327; b=meVUN0H7vxVih3eqnNT5jPirRHtLySqfkAKX4a9GYz3ozkFsGofonA5TnfObX8rOmr KIH4d+tYeXVKVvAixZ+aMZL1UgXp3EEJ/mHnvcWAc8il7VrHqnGQGAU+gQMaGFw6Tv4p OTXdfO6K6069U27rqAyGpWwxAM7/LFUYk6DWjrJQm7BOyzuAB/6RUWXNdSXIi4NgVVDr UO8Blnl6bQT5ARWw7iUXo5VF0cLmU7vmDl8t2jiMg6cbUbN/mzdbfRK5E/QiOZRqZKT5 cgmBV2IRDTN+ZqaY7eOxihF0zq3l3QhKGDsCjZPzgNBOCcuhUP1DOjiOpm7GC2kFVf1t xfwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=b4/prK63n/ztQ0i9mtG6fcvViaiBIzWDHsSPW5qzfYY=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=o+a0z3MGQtxezzIMKrZJjma/pCv24/pYCOkKXJWCb9Hf3TJlTh2Wo/fdMvEJIqUKSr M+DNe7CShS4ack+wJTT/MRHCsnlEi83tHCunQGPtlhecD1aU5Ufsr/5u92cYNFPMRv8h XJmn/8Sb1tXs3tbkFKUzPdshm8NESlX+rKRPWnKaLMY7qirnQNVgSf+ZXabME3Z6P6H8 1QhMcXCk5XEDGUb1TuVcUs2POagHTQf5aLNsRgw9P+Ba3GsMTTCXR1V/OIjWdULr9GMf a9onp1HzbMwYQ5CgHBVeHwBPNHeG2J44twMCgeQsYQQ6ez9wS5nm7dyH726YrzgeoP0H 4AFA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=lMM+xh5S; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=L56kZqcD; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=A9aagIyo; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-47554e95983si13252149fac.107.2026.09.07.11.18.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2026 11:18:09 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=lMM+xh5S; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=L56kZqcD; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=A9aagIyo; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b4/prK63n/ztQ0i9mtG6fcvViaiBIzWDHsSPW5qzfYY=; b=lMM+xh5Sn7JU7pSk0E7OvAVoUi KAs4qN26XGvnhnpZrEiXuu0/tYUI1Ca6sjCY0UAfMsA1DIFy6wjKLtf0wES7krvs2z0yMlCAM0mzg S8jK/0SYjXGghDDwHQ76hhFYwwNbjyLJNvi/v8F1rS2RiWLpaecHkHjns+rLK1Mkb4GA=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1x3dux-0006Ew-Fk; Mon, 07 Sep 2026 18:18:05 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1x3duv-0006Eq-EZ for openvpn-devel@lists.sourceforge.net; Mon, 07 Sep 2026 18:18:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3g9fr4wqMNr38El/jhQkFSplrYzvHep1l65A0rDQSOg=; b=L56kZqcDeslv3Tw/+6LW+e316v LGG3Ky14W84ejFpDnB2VDy1Pehl2E4/uLDFQXh5WhX9vbMEDedj0Zpn/ne6uCRlEZH69sJbKzRYSB cMT2KImtJOtX0gdKAIQ7cg/xNMBl/CQeBusVo4n825fQxeQKbKyr4rQ+EZxmvvDw3c7I=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3g9fr4wqMNr38El/jhQkFSplrYzvHep1l65A0rDQSOg=; b=A9aagIyoKB2aOy3iYhgM6h7NyM ujLFY4LThu93u9Vze9a/2W/eKT8WrmYPvyPBy35DTfZhLluD4sR1rqZvrdURlsBYIngNwnORgwJWU d/s4G5xqi9agbpjYg8mFXI7CFw2FHDjPoYNXNogXlZA6FK+88heqA4X4EBRlUUDcwqHI=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1x3dur-0005DF-JP for openvpn-devel@lists.sourceforge.net; Mon, 07 Sep 2026 18:18:02 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 687IHsC1013372 for ; Mon, 7 Sep 2026 20:17:54 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 687IHsMd013371 for openvpn-devel@lists.sourceforge.net; Mon, 7 Sep 2026 20:17:54 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 7 Sep 2026 20:17:49 +0200 Message-ID: <20260907181754.13356-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Frank Lichtenheld - Allow to easily control verbosity and automatically adjust to the verbosity of the Make run - Allow to easily control check level. With exhaustive the check can take hours (due to options.c), so we [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1x3dur-0005DF-JP Subject: [Openvpn-devel] [PATCH v3] run-cppcheck.sh: Make it more configurable X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1875698086190377995 X-GMAIL-MSGID: 1875698086190377995 From: Frank Lichtenheld - Allow to easily control verbosity and automatically adjust to the verbosity of the Make run - Allow to easily control check level. With exhaustive the check can take hours (due to options.c), so we couldn't use that in CI v3: - Use AM_V_P instead of V to correctly reflect AM_DEFAULT_VERBOSITY Change-Id: I65beb37a2d822333aa888de1baf11dfcb8490e90 Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1868 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1868 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/Makefile.am b/Makefile.am index feeaabb..dd6cee6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,4 +96,5 @@ BUILD_DIR="$(abs_top_builddir)" \ SOURCE_DIR="$(abs_top_srcdir)" \ INCLUDE_FLAGS="$(LIBNL_GENL_CFLAGS)" \ + CPPCHECK_VERBOSE="$(AM_V_P)" \ "$(top_srcdir)/dev-tools/run-cppcheck.sh" diff --git a/dev-tools/run-cppcheck.sh b/dev-tools/run-cppcheck.sh index a7aa3c4..fc14405 100755 --- a/dev-tools/run-cppcheck.sh +++ b/dev-tools/run-cppcheck.sh @@ -2,22 +2,37 @@ set -eu +: ${CPPCHECK_VERBOSE:=false} +: ${CPPCHECK_CHECK_LEVEL:=exhaustive} + +if "${CPPCHECK_VERBOSE}"; then + verbosity_arg="-v" +else + verbosity_arg="-q" +fi + +disable_arg= +if [ "${CPPCHECK_CHECK_LEVEL}" != exhaustive ]; then + # suppress all the information that we should use exhaustive + disable_arg="--disable=information" +fi + SCRIPT_DIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}")) : ${SOURCE_DIR:=$SCRIPT_DIR/..} : ${BUILD_DIR:=$PWD} : ${INCLUDE_FLAGS:=} CPPCHECK_DIR="${BUILD_DIR}/cppcheck_build_dir" -COMMON_ARGS="-j$(nproc) -q \ +COMMON_ARGS="-j$(nproc) ${verbosity_arg} \ -DMBEDTLS_SSL_PROTO_TLS1_3 -DMBEDTLS_SSL_KEYING_MATERIAL_EXPORT \ -I./include/ -I./tests/unit_tests/openvpn/ \ -I./src/compat/ -I./src/openvpn/ -I./src/openvpnserv/ -I./src/plugins/auth-pam/ \ -I${BUILD_DIR} -I${BUILD_DIR}/include/ \ - --enable=all \ + --enable=all ${disable_arg} \ --library=${SCRIPT_DIR}/openvpn-cppcheck-library.cfg \ --library=openssl.cfg \ --suppressions-list=${SCRIPT_DIR}/cppcheck-suppression \ --cppcheck-build-dir=${CPPCHECK_DIR} \ - --check-level=exhaustive --max-configs=10 \ + --check-level=${CPPCHECK_CHECK_LEVEL} --max-configs=10 \ --error-exitcode=1" set -x