From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A18C2A0543 for ; Tue, 7 Jun 2022 10:08:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A35E40156; Tue, 7 Jun 2022 10:08:59 +0200 (CEST) Received: from smtpservice.6wind.com (unknown [185.13.181.2]) by mails.dpdk.org (Postfix) with ESMTP id 36E3340156; Tue, 7 Jun 2022 10:08:58 +0200 (CEST) Received: from 6wind.com (unknown [10.17.250.37]) by smtpservice.6wind.com (Postfix) with ESMTP id 2E75760023; Tue, 7 Jun 2022 10:08:58 +0200 (CEST) Date: Tue, 7 Jun 2022 10:08:58 +0200 From: Olivier Matz To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, weiyuanx.li@intel.com, Pablo de Lara , Harry van Haaren , Aaron Conole Subject: Re: [PATCH v2 2/2] test: use cmdline library to validate args Message-ID: References: <20220520145631.137962-1-bruce.richardson@intel.com> <20220520151240.139566-1-bruce.richardson@intel.com> <20220520151240.139566-3-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520151240.139566-3-bruce.richardson@intel.com> X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Fri, May 20, 2022 at 04:12:40PM +0100, Bruce Richardson wrote: > When passing in test names to run via either the DPDK_TEST environment > variable or via extra argv parameters, the checks run on those commands > can miss valid commands that are registered with the cmdline library in > the initial context used to set it up. This is seen in the fact that the > "dump_*" set of commands are not callable via argv parameters, but can > be called manually. > > To fix this, just use the commandline library to validate each command > before executing it, stopping execution when an error is encountered. > This also has the benefit of not having the test binrary drop to > interactive mode if all commandline parameters given are invalid. > > Fixes: 9b848774a5dc ("test: use env variable to run tests") > Fixes: ace2f054ed43 ("test: take test names from command line") > Bugzilla ID: 1002 > > Signed-off-by: Bruce Richardson Acked-by: Olivier Matz