DPDK patches and discussions
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
Subject: Re: [dpdk-dev] [PATCH] test: make hugepage check more robust under Linux
Date: Fri, 09 Apr 2021 11:06:20 -0400
Message-ID: <f7tblanjy4z.fsf@dhcp-25.97.bos.redhat.com> (raw)
In-Reply-To: <20210406145041.GC551@bricha3-MOBL.ger.corp.intel.com> (Bruce Richardson's message of "Tue, 6 Apr 2021 15:50:41 +0100")

Bruce Richardson <bruce.richardson@intel.com> writes:

> On Tue, Apr 06, 2021 at 10:20:37AM -0400, Aaron Conole wrote:
>> Bruce Richardson <bruce.richardson@intel.com> writes:
>> > On Tue, Apr 06, 2021 at 08:33:07AM -0400, Aaron Conole wrote:
>> >> Thomas Monjalon <thomas@monjalon.net> writes:
>> >> 
>> >> > 17/03/2021 15:44, Aaron Conole:
>> >> >> The hugepage test really needs to check multiple things on Linux:
>> >> >> 
>> >> >> 1. Are hugepages reserved in the system?
>> >> >> 
>> >> >> 2. Is the hugepage mountpoint available so that we can allocate them?
>> >> >> 
>> >> >> 3. Do we have permissions to write into the hugepage mountpoint?
>> >> >> 
>> >> >> The existing hugepage check only verifies the first.  On some setups,
>> >> >> a non-root user won't have access to the mountpoint for hugepages to
>> >> >> be allocated and that needs to be reflected in the test as well.  Add
>> >> >> such checks for Linux OS to give a more check when running test suites.
>> >> >
>> >> > Requirements 2 & 3 are optional.
>> >> > You don't need a mount point if using the option --in-memory.
>> >> 
>> >> That's true, but it seems to break a few of the unit tests without.
>> >> I'll clarify the commit message.
>> >> 
>> >> Additionally, I thought it would be simple to just incorporate your
>> >> suggestions - but it seems that meson / ninja doesn't have cascading
>> >> dependencies the way 'make' does (or, I haven't figured out from the
>> >> syntax how to do that) - a 'run_command' gets resolved at configure
>> >> time and it doesn't seem that we can make a run_target depend on another
>> >> run_target since dependencies are on file outputs.  Maybe we do some
>> >> kind of trickery here where we write a file that the build script reads?
>> >> 
>> >> I am trying to figure out how best to accomplish this - suggestions
>> >> welcome.
>> >> 
>> > Sorry that I'm late to this thread. Can you perhaps explain what you mean
>> > by cascading dependencies in this instance, or what you are trying to do
>> > exactly that is not supported?
>> I want to conditionally invoke the test suite with the hugepage tests,
>> and support the case that the machine has hugepages enabled, but not
>> accessible.
>> Right now, if a user runs:
>>   meson build && ninja -C build test
>> with hugepages allocated as a non-root user, they will see 'FAIL'
>> messages.  This isn't very friendly, since the user would be confused.
>> Right now, hugepage detection is done only at configure time (the
>> 'meson' step), and then the target is always run.
>> For now, I will continue modifying the below script, but that will be a
>> detection at configure time, still.  So the case where the user runs
>> 'meson' when they have hugepages, but those hugepages go away and then
>> they run 'ninja -C build test' will still be FAIL instead of SKIP (maybe
>> we need a more descriptive error when FAIL due to hugepages happen?)
> This seems to me like the test binary itself should be checking the
> presence of hugepages, and reporting skips if necessary. It's not just when
> run through ninja that this functionality would be useful.

Either way, there needs to be a rework - if we do it in the test binary,
then the tests that require hugepages need to be worked so that they
correctly detect lack of hugepage support before starting.  If we keep
that knowledge in the meson system, then we need to change the way we
call the test binary script to support a more robust detection.

I guess, I don't care too much which one is the one we choose.  My $.02
opinion is that we already have most of the logic and whatnot done in
the build system, so I'd prefer to do as small a change as possible
(leaving that logic in the meson system).  Then again, maybe it makes
more sense to just rip the bandaid off and move it all into the test


  reply	other threads:[~2021-04-09 15:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 14:44 Aaron Conole
2021-03-17 14:57 ` Thomas Monjalon
2021-04-06 12:33   ` Aaron Conole
2021-04-06 12:58     ` Bruce Richardson
2021-04-06 14:20       ` Aaron Conole
2021-04-06 14:50         ` Bruce Richardson
2021-04-09 15:06           ` Aaron Conole [this message]
2021-04-09 15:33             ` Thomas Monjalon
2021-04-12 11:33               ` David Marchand
2021-04-09 15:40             ` Bruce Richardson
2021-03-19 13:41 ` David Marchand
2021-03-19 14:34   ` Aaron Conole

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:

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

  git send-email \
    --in-reply-to=f7tblanjy4z.fsf@dhcp-25.97.bos.redhat.com \
    --to=aconole@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git