DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Ruifeng Wang <ruifeng.wang@arm.com>, Aaron Conole <aconole@redhat.com>
Cc: Michael Santana <maicolgabriel@hotmail.com>,
	 Bruce Richardson <bruce.richardson@intel.com>,
	 "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	 Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	"Wang, Yipeng1" <yipeng1.wang@intel.com>,
	 "Gobriel, Sameh" <sameh.gobriel@intel.com>, dev <dev@dpdk.org>,
	 "Burakov, Anatoly" <anatoly.burakov@intel.com>,
	Gavin Hu <gavin.hu@arm.com>,
	 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	juraj.linkes@pantheon.tech, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v3 2/4] ci: generate fast-tests suite base on hugepage availability
Date: Mon, 23 Mar 2020 09:56:38 +0100	[thread overview]
Message-ID: <CAJFAV8wXdczSy5=TqpA+4wuEfskfKBk5QmSeRAFDbn_rjkFGZA@mail.gmail.com> (raw)
In-Reply-To: <20200313081614.195335-3-ruifeng.wang@arm.com>

On Fri, Mar 13, 2020 at 9:17 AM Ruifeng Wang <ruifeng.wang@arm.com> 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 <aconole@redhat.com>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> ---
>  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 = ['acl',
>         'timer'
>  ]
>
> +# Each test is marked with flag true/false
> +# to indicate whether it can run in no-huge mode.
>  fast_test_names = [

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 = executable('dpdk-test',
>         install_rpath: driver_install_path,
>         install: true)
>
> +has_hugepage = true
> +if host_machine.system() == 'linux'

We have is_OS helpers, here it should be if is_linux.


> +       check_hugepage = run_command('cat',
> +                                    '/proc/sys/vm/nr_hugepages')
> +       if (check_hugepage.returncode() != 0 or
> +           check_hugepage.stdout().strip() == '0')
> +               has_hugepage = 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 = 600
> @@ -407,22 +420,33 @@ test_args = [num_cores_arg]
>
>  foreach arg : fast_test_names
>         if (get_option('default_library') == 'shared' and
> -               arg == 'event_eth_tx_adapter_autotest')
> +               arg[0] == 'event_eth_tx_adapter_autotest')
>                 foreach drv:dpdk_drivers
>                         test_args += ['-d', drv.full_path().split('.a')[0] + '.so']
>                 endforeach
>         endif
>         if host_machine.system() == 'linux'
> -               test(arg, dpdk_test,
> -                         env : ['DPDK_TEST=' + arg],
> -                         args : test_args +
> -                                ['--file-prefix=@0@'.format(arg)],
> -               timeout : timeout_seconds_fast,
> -               is_parallel : false,
> -               suite : 'fast-tests')
> +               if has_hugepage
> +                       test(arg[0], dpdk_test,
> +                                 env : ['DPDK_TEST=' + arg[0]],
> +                                 args : test_args +
> +                                        ['--file-prefix=@0@'.format(arg[0])],
> +                       timeout : timeout_seconds_fast,
> +                       is_parallel : false,
> +                       suite : 'fast-tests')
> +               elif arg[1]
> +                       test(arg[0], dpdk_test,
> +                                 env : ['DPDK_TEST=' + arg[0]],
> +                                 args : test_args +
> +                                        ['--no-huge'] + ['-m 2048'] +
> +                                        ['--file-prefix=@0@'.format(arg[0])],
> +                       timeout : timeout_seconds_fast,
> +                       is_parallel : false,
> +                       suite : 'fast-tests')
> +               endif
>         else
> -               test(arg, dpdk_test,
> -                       env : ['DPDK_TEST=' + arg],
> +               test(arg[0], dpdk_test,
> +                       env : ['DPDK_TEST=' + 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.


-- 
David Marchand


  parent reply	other threads:[~2020-03-23  8:56 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  7:32 [dpdk-dev] [PATCH v1] ci: add test suite run without hugepage Ruifeng Wang
2020-02-25  9:14 ` David Marchand
2020-02-25 14:36   ` Aaron Conole
2020-02-25 15:39     ` Ruifeng Wang
2020-02-25 15:56       ` Aaron Conole
2020-02-26  2:47         ` Ruifeng Wang
2020-02-25 15:23   ` Ruifeng Wang
2020-02-28  4:19 ` [dpdk-dev] [PATCH v2 0/2] no-huge test suite Ruifeng Wang
2020-02-28  4:19   ` [dpdk-dev] [PATCH v2 1/2] ci: allow multiple test suites to run in one job Ruifeng Wang
2020-02-28  4:19   ` [dpdk-dev] [PATCH v2 2/2] ci: add test suite run without hugepage Ruifeng Wang
2020-03-04 17:31     ` Aaron Conole
2020-03-05  3:41       ` Ruifeng Wang
2020-03-05 14:36         ` Aaron Conole
2020-03-06  8:09           ` Ruifeng Wang
2020-03-06 15:56             ` Aaron Conole
2020-03-06 16:05               ` David Marchand
2020-03-06 16:16                 ` Aaron Conole
2020-03-06 16:33                   ` Bruce Richardson
2020-03-07 14:36               ` Ruifeng Wang
2020-03-12  7:13                 ` Juraj Linkeš
2020-03-12  8:33                   ` Ruifeng Wang
2020-03-13  8:16 ` [dpdk-dev] [PATCH v3 0/4] no-huge unit test Ruifeng Wang
2020-03-13  8:16   ` [dpdk-dev] [PATCH v3 1/4] test: enable tests to run in no-huge mode Ruifeng Wang
2020-03-17 12:49     ` Aaron Conole
2020-03-17 19:15     ` Wang, Yipeng1
2020-03-13  8:16   ` [dpdk-dev] [PATCH v3 2/4] ci: generate fast-tests suite base on hugepage availability Ruifeng Wang
2020-03-17 12:50     ` Aaron Conole
2020-03-23  8:56     ` David Marchand [this message]
2020-03-23  9:32       ` David Marchand
2020-03-23 15:50         ` Ruifeng Wang
2020-03-28 16:17           ` David Marchand
2020-03-30 16:03             ` Ruifeng Wang
2020-04-10 12:25               ` David Marchand
2020-03-23 15:36       ` Ruifeng Wang
2020-03-13  8:16   ` [dpdk-dev] [PATCH v3 3/4] ci: proceed with verification without hugepage Ruifeng Wang
2020-03-17 12:50     ` Aaron Conole
2020-03-13  8:16   ` [dpdk-dev] [PATCH v3 4/4] ci: enable unit test for aarch64 Ruifeng Wang
2020-03-17 12:50     ` Aaron Conole
2020-03-13 12:48   ` [dpdk-dev] [PATCH v3 0/4] no-huge unit test Aaron Conole
2020-03-13 13:04     ` Aaron Conole
2020-03-13 15:54       ` David Marchand
2020-03-16  8:27         ` Ruifeng Wang
2020-03-16 13:25           ` Aaron Conole
2020-03-16 14:13         ` Aaron Conole
2020-03-16 14:41           ` Bruce Richardson
2020-03-17 17:02   ` dwilder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8wXdczSy5=TqpA+4wuEfskfKBk5QmSeRAFDbn_rjkFGZA@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=aconole@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=juraj.linkes@pantheon.tech \
    --cc=konstantin.ananyev@intel.com \
    --cc=maicolgabriel@hotmail.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=sameh.gobriel@intel.com \
    --cc=yipeng1.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).