From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08519C43334 for ; Fri, 10 Jun 2022 14:24:17 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 132E34069C; Fri, 10 Jun 2022 16:24:17 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id AF0C040689 for ; Fri, 10 Jun 2022 16:24:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654871055; x=1686407055; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z/0FXQ0yVay7r/9aJRD5RbjEVRNzhq3M7IZFQBhu/Pk=; b=UsMA+eWfam0xmbYFfSjH5KnDNKVzfa1f9Ug4VpNbK7NfQYqmvVSvt8FH btv6BdaHDOXEjCg8cL97gd4bmC9Lg5A9RPtrv1BfJ5a5o/CINr4KydPMn HJoUXwyLzSwTM2gF8AaHSMHXuwXp4mGyaLYcgDtRaE3LKWHvzpONKY4Po lWaq09pawp5OGK0WizC8nTU8EDW7VZJjDICEd850EZRChUi8QBeTxSA45 hyEEupjQ2gtDpHUHtHD+8bjGyIRG3NiNFx4eQGsCNTfOzpykghX8Y+svV 3RHbeHjlP8+X0m8lsvlw3ehKLkRr1HWOMcDe3UJxKmx+4qJMK7xdwP0l+ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="258079374" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="258079374" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 07:24:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="684568657" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com.) ([10.237.223.181]) by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 07:24:12 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: olivier.matz@6wind.com, Bruce Richardson Subject: [PATCH v3 0/2] fix uncallable unit tests (Bugzilla 1002) Date: Fri, 10 Jun 2022 15:24:04 +0100 Message-Id: <20220610142406.580943-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220520145631.137962-1-bruce.richardson@intel.com> References: <20220520145631.137962-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The dump* unit tests are uncallable from our test framework because the command validation in the unit test binary is incorrect. Rather than trying to fix this directly in the binary, a better approach is to add command validation to the cmdline library - which already has 99% of what we need already - and use that from the test app. Patch fix not CC'ed to stable, as fix requires new function in cmdline library. V3: * Fix feedback from Olivier's review * Fix typo in spelling of "binary" (binrary) in patch 2 commit log V2: * Fix checkpatch issues Bruce Richardson (2): cmdline: add function to verify valid commands test: use cmdline library to validate args app/test/commands.c | 11 ----------- app/test/test.c | 24 +++++++----------------- lib/cmdline/cmdline_parse.c | 28 ++++++++++++++++++++-------- lib/cmdline/cmdline_parse.h | 17 +++++++++++++++-- lib/cmdline/version.map | 3 +++ 5 files changed, 45 insertions(+), 38 deletions(-) -- 2.34.1