On 08/07/2012 04:42 AM, Yu Mingfei wrote:
Signed-off-by: Yu Mingfei<[email protected]>
---
  client/virt/subtests.cfg.sample |   69
+++++++++++++++++++++++++++++++++++++++
  1 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/client/virt/subtests.cfg.sample
b/client/virt/subtests.cfg.sample
index c2aca1f..b6e8807 100644
--- a/client/virt/subtests.cfg.sample
+++ b/client/virt/subtests.cfg.sample
@@ -307,6 +307,75 @@ variants:
                  libvirtd = "off"
                  status_error = "yes"

+    - virsh_list:
+        type = virsh_list
+        vm_start = yes
+        kill_vm = yes
+        kill_vm_on_error = yes
+        variants:
+            - with_valid_options:
+                status_error = "no"
+                variants:
+                    - inactive:
+                        options_ref = "inactive"
+                    - all:
+                        options_ref = "all"
+                    - none:
+                        options_ref = ""
+                variants:
+                    - list_table:
+                        list_ref = "table"
+                    - list_name:
+                        list_ref = "name"
+                    - list_uuid:
+                        list_ref = "uuid"
+            - with_invalid_options:
+                status_error = "yes"
+                variants:
+                    - invalid_string:
+                        options_ref = "xyz"
+                    - vm_id:
+                        options_ref = "vm_id"
+                    - vm_name:
+                        options_ref = "vm_name"
+                    - vm_uuid:
+                        options_ref = "vm_uuid"
+        variants:
+            - normal_test:
+                addition_status_error = "no"
+            - special_test:
+                variants:
+                    - list_transient_domains:
+                        only with_valid_options
+                        addition_status_error = "no"
+                        vm_ref = "transient"
+                    - list_persistent_domains:
+                        only with_valid_options
+                        addition_status_error = "no"
+                        vm_ref = "persistent"
+                    - with_managed_save:
+                        only with_valid_options.list_table.all
+                        #Because managedsave command will shutdown domain
+                        #we should list all if we need to check the
mark of saved.
+                        addition_status_error = "no"
+                        vm_ref = "managed-save"
+                    - list_local_domains_on_remote:
+                        #You should config ssh autologin between remote
and local
+                        #when you test list_local_domains_on_remote.
+                        only with_valid_options
+                        addition_status_error = "no"
+                        remote_ref = "remote"
+                        #remote host's IP
+                        remote_ip = "127.0.0.1"
+                        #remote host's password
+                        remote_passwd = "password"
+                        #local host's ip
+                        local_ip = "127.0.0.1"
+                    - with_libvirt_off:
+                        only with_valid_options
+                        addition_status_error = "yes"
+                        libvirtd = "off"
+
      - module_probe:
          type = module_probe
          # You can specify your own module list, though it is not
needed usually.
-- 1.7.1

--
Best Regards
Yu Mingfei


Yu,

A great many of these tests won't run on RHEL 5, however I noticed at least one that seems to be passing after a faulure:

The cartesian name is: ...virsh_list.special_test.with_libvirt_off.with_valid_options.list_name.none

and I got:

...
13:44:16 DEBUG| Starting tcpdump '/usr/sbin/tcpdump -npvi any 'dst port 68''
13:44:16 DEBUG| KVM version: kvm-83-249.el5_8.4
13:44:16 DEBUG| KVM userspace version: Unknown
13:44:16 DEBUG| Preprocessing VM 'autotest-rhel63-64'
13:44:16 DEBUG| VM is not alive; starting it...
13:44:17 DEBUG| waiting for domain autotest-rhel63-64 to start (0.000027 secs)
13:44:17 DEBUG| Running 'service libvirtd stop'
13:44:17 DEBUG| stop libvirtd successfuly
13:44:17 INFO | domain's name is: autotest-rhel63-64
13:44:17 DEBUG| Running command: /usr/bin/virsh  list --name
13:44:17 DEBUG| status: 1
13:44:17 DEBUG| stdout:
13:44:17 DEBUG| stderr: error: command 'list' doesn't support option --name
13:44:17 DEBUG| Running 'service libvirtd start'
13:44:17 DEBUG| start libvirtd successfuly
13:44:17 DEBUG| Postprocessing VM 'autotest-rhel63-64'
13:44:17 DEBUG| Param 'kill_vm' specified, killing VM
13:44:17 DEBUG| Destroying VM
...

This may be a problem specific to RHEL 5, but even so, we shouldn't have failing tests marked passing. It needs to raise TestNA or another failure exception.

One suggestion is to maybe have the test examine the 'virsh list --help' output before testing a particular option. This tends to be easier and more reliable than checking 'virsh version'. Just an idea.

See what you can do, and if you're completely stuck, let me know and I'll take a deeper look.

Thanks.

--
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to