From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FA4DA0563; Mon, 23 Mar 2020 09:56:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AF3E1C037; Mon, 23 Mar 2020 09:56:56 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by dpdk.org (Postfix) with ESMTP id 0A8471C036 for ; Mon, 23 Mar 2020 09:56:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584953814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/8FWUFAIWOyIYKU0l1Hg1XIJOC9VqX/X0a9fD5KOvZk=; b=VRlunxN1pVy93Kk0TbpxDK2XA/bHSiHEtwgonSqEWNYq+IMcXxZO3amhZIPiZC6pvAXfdX mPEv3ukIkbADGelt/4b3WNWOuXeL+7JsbCuuxLDx+hE7mR7RcDfuP1Ib/TdzM1872zPY/r 8FcrPHCgrOjW+LP8M/V3FE0fQGqTm0Q= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-377-_XTutQHiOR-AzylwOmQIeQ-1; Mon, 23 Mar 2020 04:56:50 -0400 X-MC-Unique: _XTutQHiOR-AzylwOmQIeQ-1 Received: by mail-ua1-f70.google.com with SMTP id a30so4704159uae.6 for ; Mon, 23 Mar 2020 01:56:50 -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=f7nDTSWGiZvw+m5CCJhR3s6N9LQCM+vXqEIt6X3dNSY=; b=t8BSNgZW+AlqsYGb3VL/yWZT1vJCb8JvOxlok3npYA9B8izVWkRkGqQtzrVReaeczo LSuIr1jNKIAJJYtpkqFZlIfNeRzEvHWdYD17w2bzV/mhUpNDsVSJA0ESIjxEIh5BXL/m TQONAnujnRql4IocKNAyDozpY0CHhpK94tOzsK1FmUQP9Mc3R0IJgASihNC8Cu4djuNY ckvEJwN2WVhLoE6xa1OaSZHKlmbNLH7FPe7yLc6ZEw4IhnAqISuq9CL2a9LNa65yZyoo fpU7d2+Hf8DgbRQmVipJMurAaV+RXAvxFF+oAR7BmggUy98g+QoRkus0jof6okgVcyHT bcLQ== X-Gm-Message-State: ANhLgQ1HV+bh6FJXBsErlxoTEs4CXTDg0Ryavd8nEB8vmKapBnyiR6VN 6wSLYMC+DBWji2GKZJCuEqc53oBKfjWY8Vsn1eDEW+GxlkBeD/al1ZR+UIjqt4xLIPJatEK2G6u iqsFYQrNm89ZDtKs2XMM= X-Received: by 2002:a05:6102:7c7:: with SMTP id y7mr14826484vsg.198.1584953810068; Mon, 23 Mar 2020 01:56:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvgTTKefrLa1lFqhzfEsl2TTrDKLXvUR144WiA4LTShrQGlwOaHdZ6yx6HcPDnJuSt8/7quU0cKE0SjKJsz8lI= X-Received: by 2002:a05:6102:7c7:: with SMTP id y7mr14826461vsg.198.1584953809694; Mon, 23 Mar 2020 01:56:49 -0700 (PDT) MIME-Version: 1.0 References: <20200225073236.135581-1-ruifeng.wang@arm.com> <20200313081614.195335-1-ruifeng.wang@arm.com> <20200313081614.195335-3-ruifeng.wang@arm.com> In-Reply-To: <20200313081614.195335-3-ruifeng.wang@arm.com> From: David Marchand Date: Mon, 23 Mar 2020 09:56:38 +0100 Message-ID: To: Ruifeng Wang , Aaron Conole Cc: Michael Santana , Bruce Richardson , "Ananyev, Konstantin" , Cristian Dumitrescu , "Wang, Yipeng1" , "Gobriel, Sameh" , dev , "Burakov, Anatoly" , Gavin Hu , Honnappa Nagarahalli , juraj.linkes@pantheon.tech, nd X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v3 2/4] ci: generate fast-tests suite base on hugepage availability 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" On Fri, Mar 13, 2020 at 9:17 AM Ruifeng Wang wrote: > > In environments where hugepage are not available, such as > containers, many cases in fast-tests suite should also run > if no-huge EAL option is used. > > Flag is appended to each case in fast-tests suite to indicate > whether it lives with no-huge mode. > With the flag, fast-tests suite can be generated based on > detected hugepage availability of building environment. > All cases will be valid if hugepage is available, whereas > only applicable cases will be added if environment has no > hugepage support. > > Suggested-by: Aaron Conole > Signed-off-by: Ruifeng Wang > Reviewed-by: Gavin Hu > --- > app/test/meson.build | 216 ++++++++++++++++++++++++------------------- > 1 file changed, 120 insertions(+), 96 deletions(-) > > diff --git a/app/test/meson.build b/app/test/meson.build > index 0a2ce710f..dd121a297 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -154,87 +154,89 @@ test_deps =3D ['acl', > 'timer' > ] > > +# Each test is marked with flag true/false > +# to indicate whether it can run in no-huge mode. > fast_test_names =3D [ Nit: this variable does not contain a list of names anymore, how about "fast_tests". > - 'acl_autotest', > - 'alarm_autotest', > - 'atomic_autotest', [snip] > + ['acl_autotest', true], > + ['alarm_autotest', false], > + ['atomic_autotest', false], [snip] > @@ -395,6 +397,17 @@ dpdk_test =3D executable('dpdk-test', > install_rpath: driver_install_path, > install: true) > > +has_hugepage =3D true > +if host_machine.system() =3D=3D 'linux' We have is_OS helpers, here it should be if is_linux. > + check_hugepage =3D run_command('cat', > + '/proc/sys/vm/nr_hugepages') > + if (check_hugepage.returncode() !=3D 0 or > + check_hugepage.stdout().strip() =3D=3D '0') > + has_hugepage =3D false > + endif > +endif > +message('hugepage availbility: @0@'.format(has_hugepage)) availability* > + > # some perf tests (eg: memcpy perf autotest)take very long > # to complete, so timeout to 10 minutes > timeout_seconds =3D 600 > @@ -407,22 +420,33 @@ test_args =3D [num_cores_arg] > > foreach arg : fast_test_names > if (get_option('default_library') =3D=3D 'shared' and > - arg =3D=3D 'event_eth_tx_adapter_autotest') > + arg[0] =3D=3D 'event_eth_tx_adapter_autotest') > foreach drv:dpdk_drivers > test_args +=3D ['-d', drv.full_path().split('.a')= [0] + '.so'] > endforeach > endif > if host_machine.system() =3D=3D 'linux' > - test(arg, dpdk_test, > - env : ['DPDK_TEST=3D' + arg], > - args : test_args + > - ['--file-prefix=3D@0@'.format(arg)], > - timeout : timeout_seconds_fast, > - is_parallel : false, > - suite : 'fast-tests') > + if has_hugepage > + test(arg[0], dpdk_test, > + env : ['DPDK_TEST=3D' + arg[0]], > + args : test_args + > + ['--file-prefix=3D@0@'.format(ar= g[0])], > + timeout : timeout_seconds_fast, > + is_parallel : false, > + suite : 'fast-tests') > + elif arg[1] > + test(arg[0], dpdk_test, > + env : ['DPDK_TEST=3D' + arg[0]], > + args : test_args + > + ['--no-huge'] + ['-m 2048'] + > + ['--file-prefix=3D@0@'.format(ar= g[0])], > + timeout : timeout_seconds_fast, > + is_parallel : false, > + suite : 'fast-tests') > + endif > else > - test(arg, dpdk_test, > - env : ['DPDK_TEST=3D' + arg], > + test(arg[0], dpdk_test, > + env : ['DPDK_TEST=3D' + arg[0]], > args : test_args, > timeout : timeout_seconds_fast, > is_parallel : false, Not a fan of these conditionals. I sent a little patch fixing an issue I spotted on test_args: http://patchwork.dpdk.org/patch/67026/ I rebased this series on it, see: https://github.com/david-marchand/dpdk/commits/ci This makes the code easier to read from my pov: https://github.com/david-marchand/dpdk/blob/ci/app/test/meson.build#L421 If you are fine with it, I can post a v4 series. --=20 David Marchand