From patchwork Wed Mar 31 06:33:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 89890 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2V6TVeI007139 for ; Wed, 31 Mar 2010 06:29:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757670Ab0CaG33 (ORCPT ); Wed, 31 Mar 2010 02:29:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55995 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757280Ab0CaG32 (ORCPT ); Wed, 31 Mar 2010 02:29:28 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2V6TRCH027862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 31 Mar 2010 02:29:27 -0400 Received: from localhost.localdomain ([10.66.91.25]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2V6TOGM026832; Wed, 31 Mar 2010 02:29:25 -0400 Subject: [PATCH v2] KVM test: Make the profiler could be configurated To: autotest@test.kernel.org, lmr@redhat.com, kvm@vger.kernel.org From: Jason Wang Cc: mgoldish@redhat.com Date: Wed, 31 Mar 2010 14:33:46 +0800 Message-ID: <20100331063346.6270.38055.stgit@localhost.localdomain> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 31 Mar 2010 06:29:37 +0000 (UTC) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 8531c79..25f3c8c 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -866,24 +866,19 @@ 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", "").split() + for profiler in profilers: + 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= bool(profilers) or None) + + for profiler in profilers: + 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..0f6721f 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