From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [Automated-testing] [RFC] [PATCH] lib: Add support for test tags
Date: Fri, 16 Nov 2018 15:51:06 +0100 [thread overview]
Message-ID: <20181116145106.GA13883@rei.lan> (raw)
In-Reply-To: <ECADFF3FD767C149AD96A924E7EA6EAF88A3CBD9@USCULXMSG01.am.sony.com>
Hi!
> > > It sounds like you will be preserving test metadata with two different uses:
> > > 1) dependencies required for the test to execute
> > > 2) possible explanations for test failure
> > >
> > > There might be a value in keeping these distinct.
> >
> > It's a bit more complicated than this in LTP we have basically three sets:
> >
> > 1) test dependencies that could be derived from the test structure
> > (these are the needs_root, needs_device, but also needs mkfs.foo or
> > others)
> >
> > 2) test dependencies that has to be specified explicitely
> > (test is doing something with global resources, SysV IPC, Wall
> > clock)
>
> Ahhh. This turned on a light bulb in my head, and was a new thought
> for me, that really blew my mind.
>
> The reason is that Fuego runs only one test at a time on the target, so
> any test automatically has exclusive access (from a test standpoint)
> to on-target resources. This is a result of how Fuego uses Jenkins
> to schedule testing jobs.
>
> I've been focused on off-target resource allocation (like the netperf
> server, or off-board power measurement hardware). It's important
> for tests that work in the same "lab" to be able to reserve these
> exclusively to avoid contention and perturbation of the test results.
> And this is a difficult problem because there are no standards whatsoever
> for doing this. This ends up being a test scheduling issue (and possibly
> a deadlock avoidance/resolution issue).
>
> But this dependency you mention is focused on on-target resources, to
> which a test might also need exclusive access. This also presents a
> test scheduling issue.
>
> A few questions:
>
> Can LTP run multiple tests simultaneously? I seem to recall something
> about ltp-pan running multiple tests at the same time (for stress testing).
Not at the moment, but given that even embedded hardware have multicore
CPUs these days it's a waste of resources and even more on server grade
hardware with many cores.
There is subset of tests that will fail if the machine is under load for
example, which also prevents us from runnig the testsuite with some kind
of backgroud CPU load and under memory pressure, which is just another
reason why we need annotations like this.
> Does LTP have a mechanism to "claim" or "reserve" a resource
> on the system under test?
There is none, which is the reason I started to look into this.
My take on the problem is that each test would export this information
to the testrunner so that the testrunner can make informed decisions.
It could be as simple as a sinle bit of data that tells the testrunner
not to run the tests in parallel, but I would like to be a bit more
granular from the start. For instance we can run a few tests that
require loop device in parallel as well, no need to limit this.
> Does LTP have a mechanism to schedule tests? That is, to check for
> resource availability and hold off test execution until a resource
> becomes available?
Not yet, this is what I'm currently looking into.
But I do not see any complications down the road, once the testrunner
has the information, we just need to refrain from running conflicting
tests while saturating the CPU usage with running NCPU+1 test at a time
or so.
> Thanks. I really appreciate that you posted this to the automated-testing
> list so we could think about it and the problems it's solving for you.
And I do appreciate that there is some discussion around this :-).
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-11-16 14:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 14:22 [LTP] [RFC] [PATCH] lib: Add support for test tags Cyril Hrubis
2018-11-08 5:11 ` Li Wang
2018-11-08 12:52 ` Cyril Hrubis
2018-11-08 20:01 ` [LTP] [Automated-testing] " Tim.Bird
2018-11-09 12:28 ` Cyril Hrubis
2018-11-12 16:09 ` Tim.Bird
2018-11-16 14:51 ` Cyril Hrubis [this message]
2018-11-08 17:30 ` [LTP] " Jan Stancek
2018-11-08 20:19 ` [LTP] [Automated-testing] " Tim.Bird
2018-11-09 10:28 ` Cyril Hrubis
2018-11-12 16:25 ` Tim.Bird
2018-11-16 15:02 ` Cyril Hrubis
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=20181116145106.GA13883@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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