From patchwork Mon May 4 12:08:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: supriya kannery X-Patchwork-Id: 21708 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n44CFtqx029285 for ; Mon, 4 May 2009 12:15:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755752AbZEDMPw (ORCPT ); Mon, 4 May 2009 08:15:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754718AbZEDMPw (ORCPT ); Mon, 4 May 2009 08:15:52 -0400 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:42240 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755520AbZEDMPv (ORCPT ); Mon, 4 May 2009 08:15:51 -0400 Received: from d23relay02.au.ibm.com (d23relay02.au.ibm.com [202.81.31.244]) by e23smtp08.au.ibm.com (8.13.1/8.13.1) with ESMTP id n44CDebY007214 for ; Mon, 4 May 2009 22:13:40 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay02.au.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n44CFoRN1532134 for ; Mon, 4 May 2009 22:15:50 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n44CFnD1018621 for ; Mon, 4 May 2009 22:15:50 +1000 Received: from skannery.in.ibm.com (skannery.in.ibm.com [9.124.31.91]) by d23av01.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n44CFl0V018611; Mon, 4 May 2009 22:15:47 +1000 Message-ID: <49FEDACC.9000605@in.ibm.com> Date: Mon, 04 May 2009 17:38:44 +0530 From: supriya kannery User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Michael Goldish CC: kvm@vger.kernel.org, Uri Lublin Subject: Re: [KVM-AUTOTEST] [PATCH] Iterate over reboot References: <768963532.547971241172793237.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> In-Reply-To: <768963532.547971241172793237.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Michael Goldish wrote: > ----- "supriya kannery" wrote: > > >> Uri Lublin wrote: >> >>> supriya kannery wrote: >>> >>>> A patch for iterating over VM reboot >>>> >>>> >>> I think adding iterations capability belongs to the infrastructure, >>> >>> not the test itself. Implement it once in the infrastructure, >>> > There are two quick ways I can think of. > In both cases, the user needs to define something like "iterations = 4" in the config file, where desired. > Different tests can have different iteration values, depending on where the parameter is set. > > 1. Read the 'iterations' parameter in the control file, and pass its value as the 'iterations' parameter to job.run_test(), e.g. > > iterations = int(dict.get("iterations", "1")) > current_status = job.run_test("kvm_runtest_new", params=dict, tag=dict.get("shortname"), iterations=iterations) > > Hopefully the iteration number will be appended to the test tag (e.g. Fedora.8.32.reboot.1, Fedora.8.32.reboot.2...). > Michael, Thanks! for pointing out how to use job.runtest(). Attaching a patch that implements the test iterations through job.runtest(). Here, we are not appending shortname with iteration value because the iteration values corresponding to each dict which we pass through job.runtest() is received by tests.py and is being used to loop over kvm_runtest_2 . And kvm_runtest_2 in turn calls the corresponding test routine (boot, reboot, migration etc). That way the aim of looping over the respective test type is accomplished. But still I need to confirm whether this does the actual iteration over rebooting of VM in a loop, because kvm_runtest _2 calls the "boot" routine even for reboot test type. When iterating over reboot, my expectation is that, qemu window shouldn't get killed, while the VM should be rebooting multiple times. > Signed-off-by: Supriya Kannery Cc : Michael Goldish --- kvm-autotest-tap/client/tests/kvm_runtest_2/control 2009-05-04 17:03:20.000000000 +0530 +++ kvm-autotest-tap/client/tests/kvm_runtest_2/control.mod 2009-05-04 17:02:52.000000000 +0530 @@ -99,7 +99,8 @@ for dict in list: dependencies_satisfied = False break if dependencies_satisfied: - current_status = job.run_test("kvm_runtest_2", params=dict, tag=dict.get("shortname")) + test_iterations=int(dict.get("iterations",1)) + current_status = job.run_test("kvm_runtest_2", params=dict, tag=dict.get("shortname"),iterations=test_iterations) else: current_status = False status_dict[dict.get("name")] = current_status