diff mbox

[KVM-AUTOTEST] Iterate over reboot

Message ID 49FEDACC.9000605@in.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

supriya kannery May 4, 2009, 12:08 p.m. UTC
Michael Goldish wrote:
> ----- "supriya kannery" <supriyak@in.ibm.com> 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 <supriyak@in.ibm.com>
Cc : Michael Goldish <mgoldish@redhat.com>

Comments

Uri Lublin May 25, 2009, 11:21 a.m. UTC | #1
On 05/04/2009 03:08 PM, supriya kannery wrote:

A commit-message is useful here.

> Signed-off-by: Supriya Kannery<supriyak@in.ibm.com>
> Cc : Michael Goldish<mgoldish@redhat.com>
>
 > --- 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))

Please leave a space following a comma, here       ^

 >+        current_status = job.run_test("kvm_runtest_2", params=dict, 
tag=dict.get("shortname"),iterations=test_iterations)

Please use shorter lines.

 >     else:
 >         current_status = False
 >     status_dict[dict.get("name")] = current_status


Applied, with above mentioned changes.

Thanks,
     Uri.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 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