From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 56945A0679 for ; Mon, 1 Apr 2019 15:48:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC8B034F3; Mon, 1 Apr 2019 15:48:38 +0200 (CEST) Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) by dpdk.org (Postfix) with ESMTP id 36AADA3 for ; Mon, 1 Apr 2019 15:48:37 +0200 (CEST) Received: by mail-vs1-f48.google.com with SMTP id f22so5523530vso.7 for ; Mon, 01 Apr 2019 06:48:37 -0700 (PDT) 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=YxHQgJ+q2R+CSP2J04BMFb8NU4AocB8jZMtLfTvIElY=; b=m9+90qMvrk1sd7vM5ZQiW3VkQd/fyTktZLCQ5fDIK4pH7ts5fiduDTsK6S0Q0zojFh T65QqUIaO07N9n+xa3HiJm5THkXavNfSwRNvIOJyUeLyq8+j6GGUU2uaEDfu810/EYDw x1mf+YYvf5O5vkWl7LnkIo7iKvqS+SMO6CegNQ0wLbSGDHzDS97iuCeTuN9p7DO5cW/f e1nHKQxAhAwcfi88UbcXnrYH1B3/fAnBca6pYLpwawLM62pHiU8A86M64xmtzlIGQK8A IDAVLHI/nMXXhv7rilYTC3HB2zvxYVpYL9j5RYpeR5FYQ/uuVNciHf3v2l2OEj8PmnBh 3K6Q== X-Gm-Message-State: APjAAAUvowgkZjhLMcryi9o8WxWDNyxZrIvQQY6n9roRO8Ez7WDOj6q4 LvFuUSFAbIm7JDCKWq8EgBFZ63dXSXyh1YF7ABPVwQ== X-Google-Smtp-Source: APXvYqwLwZg3pPPVWuMs8yBBpv64aM/0R/mDddvwraxoVMJhoDNrhchLJ1xTL/1iSNJ37T95k369oVg5/8d1WnG8Xtg= X-Received: by 2002:a67:eb57:: with SMTP id x23mr18754062vso.39.1554126516484; Mon, 01 Apr 2019 06:48:36 -0700 (PDT) MIME-Version: 1.0 References: <20190329172241.11916-1-aconole@redhat.com> <20190329172241.11916-2-aconole@redhat.com> In-Reply-To: <20190329172241.11916-2-aconole@redhat.com> From: David Marchand Date: Mon, 1 Apr 2019 15:48:25 +0200 Message-ID: To: Aaron Conole Cc: dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [RFC 1/3] test/meson: auto detect number of cores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190401134825.z4UYQrzDXOS-CnQ8N9jaQKrSGz5NNcBknRCzOFwxZIE@z> On Fri, Mar 29, 2019 at 6:23 PM Aaron Conole wrote: > Some environments do not provide a minimum 4 cores for running tests. This > allows those environments to still execute 'ninja test' without causing > multiple failures. > > Signed-off-by: Aaron Conole > --- > app/test/meson.build | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/app/test/meson.build b/app/test/meson.build > index ddb4d09ae..975b38daa 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -337,10 +337,15 @@ if get_option('tests') > timeout_seconds = 600 > timeout_seconds_fast = 10 > > + # Retreive the number of CPU cores > + num_cores = run_command('lscpu', > '-p=cpu').stdout().strip().split('\n')[-1] > + num_cores_arg = '-l 0-' + num_cores > Seeing how we can reduce the core number, we can at least cap it to 4 and not use all the cores on bigger systems. But, thinking again, do you know if there is a need for more than 2 cores in the existing tests ? + > + test_args = [num_cores_arg, '-n 4'] > foreach arg : fast_parallel_test_names > test(arg, dpdk_test, > env : ['DPDK_TEST=' + arg], > - args : ['-c f','-n 4', '--file-prefix=@0@ > '.format(arg)], > + args : test_args + ['--file-prefix=@0@ > '.format(arg)], > timeout : timeout_seconds_fast, > suite : 'fast-tests') > endforeach > @@ -348,6 +353,7 @@ if get_option('tests') > foreach arg : fast_non_parallel_test_names > test(arg, dpdk_test, > env : ['DPDK_TEST=' + arg], > + args : test_args + ['--file-prefix=@0@ > '.format(arg)], > I don't understand this part. (How|) was it working before ? Is there some default args ? I could not find it. timeout : timeout_seconds_fast, > is_parallel : false, > suite : 'fast-tests') > -- David Marchand