From mboxrd@z Thu Jan 1 00:00:00 1970 From: supriya kannery Subject: Re: [KVM-AUTOTEST] [PATCH] Iterate over reboot Date: Mon, 04 May 2009 17:38:44 +0530 Message-ID: <49FEDACC.9000605@in.ibm.com> References: <768963532.547971241172793237.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030404010607070605040303" Cc: kvm@vger.kernel.org, Uri Lublin To: Michael Goldish Return-path: 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 In-Reply-To: <768963532.547971241172793237.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------030404010607070605040303 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. > --------------030404010607070605040303 Content-Type: text/plain; name="iterate-tests.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="iterate-tests.patch" U2lnbmVkLW9mZi1ieTogU3Vwcml5YSBLYW5uZXJ5IDxzdXByaXlha0Bpbi5pYm0uY29tPgpD YyA6IE1pY2hhZWwgR29sZGlzaCA8bWdvbGRpc2hAcmVkaGF0LmNvbT4KCi0tLSBrdm0tYXV0 b3Rlc3QtdGFwL2NsaWVudC90ZXN0cy9rdm1fcnVudGVzdF8yL2NvbnRyb2wJMjAwOS0wNS0w NCAxNzowMzoyMC4wMDAwMDAwMDAgKzA1MzAKKysrIGt2bS1hdXRvdGVzdC10YXAvY2xpZW50 L3Rlc3RzL2t2bV9ydW50ZXN0XzIvY29udHJvbC5tb2QJMjAwOS0wNS0wNCAxNzowMjo1Mi4w MDAwMDAwMDAgKzA1MzAKQEAgLTk5LDcgKzk5LDggQEAgZm9yIGRpY3QgaW4gbGlzdDoKICAg ICAgICAgICAgICAgICBkZXBlbmRlbmNpZXNfc2F0aXNmaWVkID0gRmFsc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