From: David Smith <dsmith@redhat.com>
To: "Zhou, Wenjian/周文剑" <zhouwj-fnst@cn.fujitsu.com>,
"Frank Ch. Eigler" <fche@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: [PATCH 3/3] Add new case for stress test
Date: Wed, 23 Dec 2015 17:46:00 -0000 [thread overview]
Message-ID: <567ADDEC.7080707@redhat.com> (raw)
In-Reply-To: <5670FC2F.8020609@cn.fujitsu.com>
On 12/15/2015 11:52 PM, "Zhou, Wenjian/å¨æå" wrote:
> On 12/15/2015 08:41 PM, Frank Ch. Eigler wrote:
>>
>> zhouwj-fnst wrote:
>>
>>> [...]
>>> +proc gen_load {} {
>>> + # if 'genload' from the ltp exists, use it to create a real load
>>> + set genload {/usr/local/ltp/testcases/bin/genload}
>>> + if [file executable $genload] {
>>> [...]
>>
>> How about using the same logic used in lib/stap_run.exp looking for
>> /usr/bin/stress? Or $PATH searching? That /usr/local/ltp path is
>> just not a good fit for general installations.
>>
>
> Hello Frank,
>
> +proc gen_load {} {
> + # if 'genload' from the ltp exists, use it to create a real load
> + set genload {/usr/local/ltp/testcases/bin/genload}
> + if [file executable $genload] {
> + exec $genload -c 10 -i 10 -m 10 -t 10
> + # ^^^^^ run for 10 seconds
> + # ^^^^^ 10 procs spinning on malloc
> + # ^^^^^ 10 procs spinning on sync
> + # ^^^^^ 10 procs spinning on sqrt
> + } else {
> + # sleep for a bit
> + wait_n_secs 10
>
> "wait_n_secs" is the function in stap_run.exp.
> If /usr/local/ltp/testcases/bin/genload is not exist, it will look for
> /usr/bin/stress.
I think Frank means we should search the path for 'genload', instead of
just looking for it in /usr/local/ltp/testcases/bin. The easiest way to
do that would be to look at the output of 'which genload'. If that was
empty, you could then look in /usr/local/ltp/testcases/bin.
> I just use the same logic of the other tests in stress.
> Do you mean "set genload" should be removed ?
It looks like testsuite/systemtap.stress/all_kernel_functions.exp and
testsuite/systemtap.stress/current.exp also have a genload function.
Perhaps we should move/combine them all the genload functions into a new
file in testsuite/lib that the 2 existing tests and your new test use.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
next prev parent reply other threads:[~2015-12-23 17:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 7:23 [PATCH 1/3] Add new semko test case Zhou Wenjian
2015-12-15 7:23 ` [PATCH 2/3] Add new test case for buffer size Zhou Wenjian
2015-12-23 17:58 ` David Smith
2015-12-15 7:23 ` [PATCH 3/3] Add new case for stress test Zhou Wenjian
2015-12-15 12:41 ` Frank Ch. Eigler
2015-12-16 5:54 ` "Zhou, Wenjian/周文剑"
2015-12-23 17:46 ` David Smith [this message]
2015-12-23 17:59 ` [PATCH 1/3] Add new semko test case David Smith
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=567ADDEC.7080707@redhat.com \
--to=dsmith@redhat.com \
--cc=fche@redhat.com \
--cc=systemtap@sourceware.org \
--cc=zhouwj-fnst@cn.fujitsu.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 read-only IMAP folder(s) and NNTP newsgroup(s).