From patchwork Fri Sep 15 11:52:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 131505 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9C7E9425A4; Fri, 15 Sep 2023 13:52:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D44D40A79; Fri, 15 Sep 2023 13:52:42 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 3CAC240A79 for ; Fri, 15 Sep 2023 13:52:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694778761; x=1726314761; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JCdNnq7onBVdGuhlO85HdpsvppPo45mEiw/NXfWfU7Y=; b=PqUgNrR/NMVs5VbzCUASItRTIoi3WWVSlnfB/y3ZO+IOj902cLWXAqPR QF8ufKoTZzqTAixe4t5ctUTmftuSs6xKuVqyF6DKXkAit9v5qt8nmoFt1 AhjzGB3lOZuTbzJejg2WgHOsPv4BsdEgsGgJS44dGKKQpiys1y29f9nhN Z/hNE/eVSIzuu8txbA6XGBrR72IywvO1mrD/dprghvlmKlUNDFlKCsPUJ YC82pK98GAHNV+ISYfO7aUO69Amu3mamhcloYOAtvhUd+m2LQb6KaNjEb 2MPewedNy1mUXTRoAx0GaAFr1WV/27C4eFK5wq0Fz64HOqgAv1SMQePGC A==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="379149251" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="379149251" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 04:52:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="918631228" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="918631228" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga005.jf.intel.com with ESMTP; 15 Sep 2023 04:52:24 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH 2/2] devtools: check for tests added without a test suite Date: Fri, 15 Sep 2023 12:52:06 +0100 Message-Id: <20230915115206.132198-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230915115206.132198-1-bruce.richardson@intel.com> References: <20230915115206.132198-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add a check in checkpatches.sh for the use of the old REGISTER_TEST_COMMAND macro, which just adds a test without including it in a test suite. Suggest to the user to add the test using the newer macros which will include the test in a test suite. Signed-off-by: Bruce Richardson --- devtools/checkpatches.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 55fabc5458..9b201db0a2 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -159,6 +159,14 @@ check_forbidden_additions() { # -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # prevent addition of tests not in one of our test suites + awk -v FOLDERS='app/test' \ + -v EXPRESSIONS='REGISTER_TEST_COMMAND' \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Using REGISTER_TEST_COMMAND instead of REGISTER__TEST' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # SVG must be included with wildcard extension to allow conversion awk -v FOLDERS='doc' \ -v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \