On 06/27/2012 09:50 AM, Chris Evich wrote:
> On 06/26/2012 11:34 PM, guyanhua wrote:
>>
>> Signed-off-by: Gu Yanhua<guyanhua-f...@cn.fujitsu.com>
>> ---
>> client/virt/subtests.cfg.sample | 26 ++++++++++++++++++++++++++
>> 1 files changed, 26 insertions(+), 0 deletions(-)
>>
>> diff --git a/client/virt/subtests.cfg.sample
>> b/client/virt/subtests.cfg.sample
>> index ebfbff5..58cdba3 100644
>> --- a/client/virt/subtests.cfg.sample
>> +++ b/client/virt/subtests.cfg.sample
>> @@ -280,6 +280,32 @@ variants:
>> status_error = "yes"
>> libvirtd = "off"
>>
>> + - virsh_freecell:
>> + type = virsh_freecell
>> + vms = ''
>> + variants:
>> + - no_option:
>> + virsh_freecell_options = ""
>> + status_error = "no"
>> + libvirtd = "on"
>> + - expected_option_all:
>> + virsh_freecell_options = "--all"
>> + status_error = "no"
>> + libvirtd = "on"
>> + - expected_option_0:
>> + virsh_freecell_options = 0
>> + status_error = "no"
>> + libvirtd = "on"
>> + - unexpected_option_xyz:
>> + virsh_freecell_options = "xyz"
>> + status_error = "yes"
>> + libvirtd = "on"
>> + - with_libvirtd_stop:
>> + virsh_freecell_options = ""
>> + status_error = "yes"
>> + libvirtd = "off"
>> +
>> +
>> - module_probe:
>> type = module_probe
>> # You can specify your own module list, though it is not needed usually.
>
> Gu,
>
> It's not critical, what you have is fine. Just to illustrate an example
> of how leveraging the Cartesian system can help produce the combination
> easier and more flexible (FYI for future additions):
> ...cut...

Since I wrote it up already, I tried tossing my tweak to your config. in 
and it works (with slight modification and one additional test):

diff --git a/client/virt/subtests.cfg.sample 
b/client/virt/subtests.cfg.sample
index 0d8f465..15ce076 100644
--- a/client/virt/subtests.cfg.sample
+++ b/client/virt/subtests.cfg.sample
@@ -280,6 +280,33 @@ variants:
                  status_error = "yes"
                  libvirtd = "off"

+    - virsh_freecell:
+        type = virsh_freecell
+        vms = ''
+        variants:
+            - expected_options:
+                status_error = "no"
+                variants:
+                    - no_option:
+                        virsh_freecell_options = ""
+                    - expected_option_all:
+                        virsh_freecell_options = "--all"
+                    - expected_option_0:
+                        virsh_freecell_options = 0
+            - error_test:
+                status_error = "yes"
+                variants:
+                    - unexpected_option_xyz:
+                        virsh_freecell_options = "xyz"
+                    - unexpected_option_12345:
+                        virsh_freecell_options = 12345
+        variants:
+            - libvirton:
+                libvirtd = "on"
+            - libvirtoff:
+                libvirtd = "off"
+                status_error = "yes"
+
      - module_probe:
          type = module_probe
          # You can specify your own module list, though it is not 
needed usually.

The only issue it has is on older libvirt.  I found old libvirt happily 
accepts the 'xyz' option and returns output of node 0!  This is 
certainly a libvirt bug (which I'll file), but I won't be surprised if 
they don't decide to fix it :S

-- 
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to