From: Jason Wang <jasowang@redhat.com>
To: autotest@test.kernel.org, lmr@redhat.com, kvm@vger.kernel.org
Subject: [PATCH 1/2] KVM test: Make the profiler could be configurated
Date: Tue, 30 Mar 2010 18:34:26 +0800 [thread overview]
Message-ID: <20100330103426.28582.42762.stgit@localhost.localdomain> (raw)
The patch let the profilers could be specified through configuration
file. kvm_stat was kept as the default profiler.
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
client/tests/kvm/kvm_utils.py | 23 ++++++++++-------------
client/tests/kvm/tests_base.cfg.sample | 2 +-
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index 8531c79..a73d5d4 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -866,24 +866,21 @@ def run_tests(test_list, job):
if dependencies_satisfied:
test_iterations = int(dict.get("iterations", 1))
test_tag = dict.get("shortname")
- # Setting up kvm_stat profiling during test execution.
- # We don't need kvm_stat profiling on the build tests.
- if dict.get("run_kvm_stat") == "yes":
- profile = True
- else:
- # None because it's the default value on the base_test class
- # and the value None is specifically checked there.
- profile = None
+ # Setting up profilers during test execution.
+ profilers = dict.get("profilers")
+ if profilers is not None:
+ for profiler in profilers.split():
+ job.profilers.add(profiler)
- if profile:
- job.profilers.add('kvm_stat')
# We need only one execution, profiled, hence we're passing
# the profile_only parameter to job.run_test().
current_status = job.run_test("kvm", params=dict, tag=test_tag,
iterations=test_iterations,
- profile_only=profile)
- if profile:
- job.profilers.delete('kvm_stat')
+ profile_only= profilers is not None)
+
+ if profilers is not None:
+ for profiler in profilers.split():
+ job.profilers.delete(profiler)
if not current_status:
failed = True
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index d162cf8..cc10713 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -41,7 +41,7 @@ nic_script = scripts/qemu-ifup
address_index = 0
# Misc
-run_kvm_stat = yes
+profilers = "kvm_stat "
# Tests
next reply other threads:[~2010-03-30 10:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 10:34 Jason Wang [this message]
2010-03-30 10:34 ` [PATCH 2/2] KVM test: Add the hwclock test into guest test Jason Wang
2010-03-30 17:02 ` [PATCH 1/2] KVM test: Make the profiler could be configurated Michael Goldish
2010-03-31 6:28 ` Jason Wang
2010-04-01 2:33 ` Lucas Meneghel Rodrigues
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=20100330103426.28582.42762.stgit@localhost.localdomain \
--to=jasowang@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lmr@redhat.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