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 23EBFA0679 for ; Wed, 3 Apr 2019 14:39:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D6FFC1B3A3; Wed, 3 Apr 2019 14:39:57 +0200 (CEST) Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) by dpdk.org (Postfix) with ESMTP id E1CC11B205 for ; Wed, 3 Apr 2019 14:39:55 +0200 (CEST) Received: by mail-vs1-f42.google.com with SMTP id n4so9867634vsm.3 for ; Wed, 03 Apr 2019 05:39:55 -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=cOv1BR/Ns25ZTEM2+EONztCvw7fMKJe7uGQxO6yZwyc=; b=l9SCqU+9ygV1QjHJNdyCTiwdqZ7fsa1GEpWuQM4/nrP+cWA/bXYbzCUs4I/OaZ0Ek9 U5ebA0To3kkQE+Cf1OxgHxDodbc5CJNr7C3gSkzhWhHX12tCYWjpsCGFFmCJeWIEmjFW J1KYxgA1zgcIvtfIdfzOBHTz4ljjCK2d2HDphxCEl8mux0QwYnFJGa+iKzgJHO8NrK/I LDIXFxAnCVNWcJQSjqAa3yq/vUgjVcY5tVvAV7PEyuIV4OJkafscGaujD49GxCM7Fz8B KqBBlqYhuKUcMhuBykARCzTgk6B3pCdykmuS8TR0YkUGBYBek563F9ddvNSZxBYD7nk+ HmdQ== X-Gm-Message-State: APjAAAXgKUbb0bBRY5By4YAewvi9j6r43+zzfEeMFEnRANWq5B5UXM4u MqkXAP+XG3hB2ey1jS/qb+7KHAHRWc1gvLjoJbFfjA== X-Google-Smtp-Source: APXvYqyGdwEVi8kcETPbG+MKPG5t5lbrM2PbGb0nUdLhPll1GzN64s/LiAGI9Q+If/V43jTiX3RSTs3WlrVFzfenRo0= X-Received: by 2002:a05:6102:199:: with SMTP id r25mr23714325vsq.166.1554295195182; Wed, 03 Apr 2019 05:39:55 -0700 (PDT) MIME-Version: 1.0 References: <1551863976-14093-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> In-Reply-To: <1551863976-14093-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> From: David Marchand Date: Wed, 3 Apr 2019 14:39:43 +0200 Message-ID: To: Agalya Babu RadhaKrishnan Cc: dev , reshma.pattan@intel.com, Bruce Richardson Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] app/test: enhance meson test run for FreeBSD and Linux 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: <20190403123943.8Mp36NCwmt2N0QZTcYx0mgKWIIKA-sOiN_Gq30An0vA@z> On Wed, Mar 6, 2019 at 10:21 AM Agalya Babu RadhaKrishnan < agalyax.babu.radhakrishnan@intel.com> wrote: > From: Agalya Babu RadhaKrishnan > > 1)For linux, running all tests on same cores can increase failure rate. > So instead run each test case on separate lcore using -l EAL option. > Lcore for each test case will be selected in the incremental order > of 0,1,2 ... till it reaches the maximum available cores in the > system which can be known from 'nproc' command. > On the other hand, by default meson runs all tests in parallel in > different threads which can be controlled by MESON_TESTTHREAD option. > eg. MESON_TESTTHREAD=4 meson test --suite DPDK:fast-tests > > 2)FreeBSD dont support file-prefix, so changes are made to run the > tests without 'file-prefix'option. > eg. meson test --suite DPDK:fast-tests > > Signed-off-by: Agalya Babu RadhaKrishnan < > agalyax.babu.radhakrishnan@intel.com> > --- > app/test/meson.build | 28 +++++++++++++++++++++++----- > 1 file changed, 23 insertions(+), 5 deletions(-) > > diff --git a/app/test/meson.build b/app/test/meson.build > index 05e5ddeb0..8303aaaa6 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -337,11 +337,29 @@ if get_option('tests') > timeout_seconds_fast = 10 > > foreach arg : fast_parallel_test_names > - test(arg, dpdk_test, > - env : ['DPDK_TEST=' + arg], > - args : ['-c f','-n 4', '--file-prefix=@0@ > '.format(arg)], > - timeout : timeout_seconds_fast, > - suite : 'fast-tests') > + if host_machine.system() == 'linux' > + lcore_number = 1 > + cores_running = run_command('nproc') > + cores_used = cores_running.stdout().to_int() > + test(arg, dpdk_test, > + env : ['DPDK_TEST=' + arg], > + args : ['-l @0@'.format(lcore_number), > '-n 4', '--file-prefix=@0@'.format(arg)], > + timeout : timeout_seconds_fast, > + suite : 'fast-tests') > + if (lcore_number < cores_used) > + lcore_number += 1 > + else > + lcore_number = 1 > + endif > + else > + test(arg, dpdk_test, > + env : ['DPDK_TEST=' + arg], > + args : ['-n 4'], > + is_parallel : false, > + timeout : timeout_seconds_fast, > + suite : 'fast-tests') > + endif > + > endforeach > > foreach arg : fast_non_parallel_test_names > We don't know if the tests really need those 4 cores, can you investigate this point before touching those parameters ? I am not sure I get all the subtilities in the meson part, but from what I understood, for Linux, you look at all the cpus available and set the corelist but for FreeBSD you rely on the EAL autodetection to catch all cpus available since you don't give a corelist/mask. To be consistent I would use the same mechanism for both Linux and FreeBSD, but I would prefer we are sure on the tests needs for cpu resources. Thanks. -- David Marchand