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 A1A2445AD8; Mon, 7 Oct 2024 19:02:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74C904026C; Mon, 7 Oct 2024 19:02:59 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 9C6494003C for ; Mon, 7 Oct 2024 19:02:58 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-20b9b35c7c3so48908515ad.3 for ; Mon, 07 Oct 2024 10:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728320578; x=1728925378; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=IkI7G3tRpK3/Hb80Vlzh48yIzboIg6a88RQ9CZ5OW+k=; b=VEbnOt2iKIK+STE9qQ2TwykWXgyMAIGxhYai2WMrRV59N8AAoUNbeXZDTfqjLgadT8 3lEpnjH6tnwD3XR/Kza4Iw+ZjRgUM2JNqCxr4i8nuv3UCWzTJsHDW3Dj2KmZAhSJ2aOi uJfVbN2vdIb4cMJPIg/iEleE4Fuvt1pJcX7eyf5y0Mf0nZwrWXF3bAyfesWFHK9dX7/X 92hRtEKQwWOFpA5HFdJahOFk5qwxiAOn15lAY3STWqDp6F7Kjs3hi5EUXsTeZbp5N53v 2zHBU/0fx3YJTLWPmsbCMBoLd9cl5ekLZq9YCLEOKn//kzwbPrbU3tLZuhLC/hbUbpvP trYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728320578; x=1728925378; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IkI7G3tRpK3/Hb80Vlzh48yIzboIg6a88RQ9CZ5OW+k=; b=f0pFS07Tmd706EQpfXGy+t9wzngcimtqfrL7vNG7VZD5x0IeYObo6MKsfKYP13De2V s0m66S4Dm9Bi5Vym/qOtDELkDbrX4lewkWpBbZGOExXxPRhA5W5VaGtKDhfMz533ZbUC BYiJw5MFJ1sIAhBvmg2jQpoOrAxdzUAhBYcXdqk1yMqX66/e5YNKToxkLVBnS7aLpAU1 //jQxgweeSflYaYTwU2MYLT1bwCbP501YmBWsL/q64ywYnIIAWiRFje2tpJlGPKxkCTH 8n0X/RsU+WQ+hUEbGOvdcSZsLERk/X1oelXSYwXQ4jkhaywFhSuaFnJP55D4ZgcMpqwY ZqCw== X-Gm-Message-State: AOJu0Yyx9g6aASH0QjK+oq9OLNN43j1zedObMU2EI8v7yOdLMcVtpi01 X798kDVE/oFVOAkeZWL+rXjo6zr5a+uMi9e+9P+8kDIN4ehaNhnJqRT4d/C5+JY= X-Google-Smtp-Source: AGHT+IGrLV4T0DYeGwFiR76u3mxDFmO8pgrKkEaEzLFazuaMvTqCkwpRFBrW/ZQLZGyzEgM0JSPn6Q== X-Received: by 2002:a17:902:d2d2:b0:207:16b9:808c with SMTP id d9443c01a7336-20bfdf6a757mr181864595ad.1.1728320577713; Mon, 07 Oct 2024 10:02:57 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c138afc8asm42048605ad.55.2024.10.07.10.02.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 10:02:57 -0700 (PDT) Date: Mon, 7 Oct 2024 10:02:55 -0700 From: Stephen Hemminger To: Mingjin Ye Cc: dev@dpdk.org, stable@dpdk.org Subject: Re: [PATCH] test: fix option block Message-ID: <20241007100255.6cd33dcb@hermes.local> In-Reply-To: <20240314094626.1068059-1-mingjinx.ye@intel.com> References: <20240314094626.1068059-1-mingjinx.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 14 Mar 2024 09:46:26 +0000 Mingjin Ye wrote: > The options allow (-a) and block (-b) cannot be used at the same time. > Therefore, allow (-a) will not be added when block (-b) is present. > > Fixes: b3ce7891ad38 ("test: fix probing in secondary process") > Cc: stable@dpdk.org > > Signed-off-by: Mingjin Ye > --- > app/test/process.h | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/app/test/process.h b/app/test/process.h > index 9fb2bf481c..388c7975cd 100644 > --- a/app/test/process.h > +++ b/app/test/process.h > @@ -44,7 +44,7 @@ add_parameter_allow(char **argv, int max_capacity) > int count = 0; > > RTE_EAL_DEVARGS_FOREACH(NULL, devargs) { > - if (strlen(devargs->name) == 0) > + if (strlen(devargs->name) == 0 || devargs->type != RTE_DEVTYPE_ALLOWED) > continue; > > if (devargs->data == NULL || strlen(devargs->data) == 0) { > @@ -74,7 +74,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value) > { > int num = 0; > char **argv_cpy; > - int allow_num; > + int allow_num, block_num; > int argv_num; > int i, status; > char path[32]; > @@ -89,7 +89,18 @@ process_dup(const char *const argv[], int numargs, const char *env_value) > if (pid < 0) > return -1; > else if (pid == 0) { > - allow_num = rte_devargs_type_count(RTE_DEVTYPE_ALLOWED); > + allow_num = 0; > + block_num = 0; > + > + /* If block (-b) is present, allow (-a) is not added. */ > + for (i = 0; i < numargs; i++) { > + if (strcmp(argv[i], "-b") == 0 || > + strcmp(argv[i], "-block") == 0) The long form of the option is "--block" not "-block". Why is a test infrastructure adding both options anyway, seems like that is the real problem.