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 6755D45AD9 for ; Mon, 7 Oct 2024 19:03:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 547B842D7A; Mon, 7 Oct 2024 19:03:00 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id A12834026C for ; Mon, 7 Oct 2024 19:02:58 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-20b7463dd89so48908705ad.2 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=sPYotAnS9A8xtodPLpDVZu8uBBgZ1O4Obx451eJWzjfBxGyQbvUqoC/zJMPg8dlkUe kKcSSFryTax4+fePisyvy1JzFykMvbCgvsz8KOZKfp/mclBC0O/TDe6eN42pEZvEeWex 38q+sNxKf8YP16avAIW/i9TVTAB6wonXHVb7Phuf8kk8/S2u0pLF5JJIXrTEvAO9futJ tgiiPzJ+zd6LRu20IbYZEq6meimsJX9sui11l+anfElHW54liehUpsmBel914BS0q6Ti FLaoliE8EYF3mZ5l5TtZE/JTSMLLqsOw3KoLL+ZCTJCh17NVXBPNoO0gjZas0ktG6Dux iV0g== X-Forwarded-Encrypted: i=1; AJvYcCXSHA9jGs1B4gqs+eBgeyjHtCCinxnM71lEy29Lgkj/oDEh2HRhccdtfTXH59MoZc++wlTmAm4=@dpdk.org X-Gm-Message-State: AOJu0YykJL+uHYNBYd9h3WVQLrJQVQG5qELA5BtA7kZZZRw+Npen820h imEOmRWbWmuHnfHkxDwzvB6inXVyZl5tyN8GvGpxTdixV4v66asWx3wA7/NF32em9mzEmHrWAXB k 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: 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 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.