From: "\"Zhou, Wenjian/周文剑\"" <zhouwj-fnst@cn.fujitsu.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: <systemtap@sourceware.org>
Subject: Re: [PATCH 3/3] Add new case for stress test
Date: Wed, 16 Dec 2015 05:54:00 -0000 [thread overview]
Message-ID: <5670FC2F.8020609@cn.fujitsu.com> (raw)
In-Reply-To: <y0mk2oflw9h.fsf@fche.csb>
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 just use the same logic of the other tests in stress.
Do you mean "set genload" should be removed ?
+ }
+ return 0
+}
--
Thanks
Zhou
next prev parent reply other threads:[~2015-12-16 5:54 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/周文剑" [this message]
2015-12-23 17:46 ` David Smith
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=5670FC2F.8020609@cn.fujitsu.com \
--to=zhouwj-fnst@cn.fujitsu.com \
--cc=fche@redhat.com \
--cc=systemtap@sourceware.org \
/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).