From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by dpdk.org (Postfix) with ESMTP id 88FA01B615 for ; Fri, 11 Jan 2019 16:07:03 +0100 (CET) Received: by mail-vs1-f47.google.com with SMTP id n10so9351616vso.13 for ; Fri, 11 Jan 2019 07:07:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GcCJ3AVfE8piO52yjKWhnfi40mFh0temUYqWO3f8F7M=; b=SPIVbooUq/OrnWN7av3+ys+Dpk0mLlh1cf9dUzN6nltvTjtmHIEbB4Av3lV/GKbaVG rysVbAmEXkTHbPlWcrSOu8BH532v0h9RH4GL/N6heMIsp1LfU6k2IL59tHsA2u3AcZh8 9t1I+VHqqAZeFLGBYZaEu1Ho3OCo+KNErgebsFSfX6py3HM8tdM+Gnfe/tg4W8U6T1p/ V+UzxhLoNzqKZKR/eeYEZ8B6gTcwKTs9NzxRGCpODWH+nxOXTXJEKXXVW9donhHm4wkf WBIQUlYAi+tg1y1rGZJCydkjQxe/aza5MmXnEeqpEe9Ef6KKWRbD0guxSzdGfMp3MYGA OJqQ== X-Gm-Message-State: AJcUuke4gVRXhrUP/Sl9s6EmOrLMnR1AjT8R2Uou9Ueqlz6Ae6quxs6i WewpefzFSAbmglahHXIrmh/teZCthhtpnQNVdHs8mQ== X-Google-Smtp-Source: ALg8bN7/MbsdcvttPeYClAFpqem9cbL0FW3N31llacYanPIwtcbgAKzFl/NpicaVZwM07bzG+VRGOaMJCoIcBikw0Nw= X-Received: by 2002:a67:2045:: with SMTP id g66mr6116605vsg.180.1547219222768; Fri, 11 Jan 2019 07:07:02 -0800 (PST) MIME-Version: 1.0 References: <1546518487-9942-1-git-send-email-hari.kumarx.vemula@intel.com> <1547216106-13680-1-git-send-email-hari.kumarx.vemula@intel.com> In-Reply-To: <1547216106-13680-1-git-send-email-hari.kumarx.vemula@intel.com> From: David Marchand Date: Fri, 11 Jan 2019 16:06:50 +0100 Message-ID: To: Hari Kumar Vemula Cc: dev@dpdk.org, "Yigit, Ferruh" , reshma.pattan@intel.com, jananeex.m.parthasarathy@intel.com, dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [PATCH v4] eal: fix core number validation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 15:07:03 -0000 On Fri, Jan 11, 2019 at 3:15 PM Hari Kumar Vemula < hari.kumarx.vemula@intel.com> wrote: > > diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c > index 2acab9d69..fc45bf953 100644 > --- a/test/test/test_eal_flags.c > +++ b/test/test/test_eal_flags.c > @@ -18,6 +18,7 @@ > #include > #include > > +#include > #include > #include > > @@ -513,6 +514,16 @@ test_missing_c_flag(void) > const char *argv25[] = { prgname, prefix, mp_flag, > "-n", "3", "--lcores", > "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"}; > + /* core number is negative value */ > + const char * const argv26[] = { prgname, prefix, mp_flag, > + "-n", "3", "--lcores", "-5" }; > + const char * const argv27[] = { prgname, prefix, mp_flag, > + "-n", "3", "--lcores", "-5-7" }; > I did not see this before, but you fixed the "-l" eal option, not "--lcores" option. So those unit tests are wrong. > + /* core number is maximum value */ > + const char * const argv28[] = { prgname, prefix, mp_flag, > + "-n", "3", "--lcores", "RTE_MAX_LCORE+1" }; > + const char * const argv29[] = { prgname, prefix, mp_flag, > + "-n", "3", "--lcores", > "1-(RTE_MAX_LCORE+1)" }; > > if (launch_proc(argv2) != 0) { > printf("Error - " > Passing "RTE_MAX_LCORE+1" is indeed wrong (be it with "-l" or "--lcores" options), but I would still prefer to check the formatted value of RTE_MAX_LCORE (no need for that +1, btw). So please, in next version, test against "-l", RTE_STR(RTE_MAX_LCORE) and "-l", "1-" RTE_STR(RTE_MAX_LCORE). Thanks. -- David Marchand