This patch adds configurations for virt-edit.

Signed-off-by: Yu Mingfei <yuming...@cn.fujitsu.com>
---
  client/virt/subtests.cfg.sample |  113 +++++++++++++++++++++++++++++++++++++++
  1 files changed, 113 insertions(+), 0 deletions(-)

diff --git a/client/virt/subtests.cfg.sample b/client/virt/subtests.cfg.sample
index ebfbff5..bb5d2f8 100644
--- a/client/virt/subtests.cfg.sample
+++ b/client/virt/subtests.cfg.sample
@@ -280,6 +280,119 @@ variants:
                  status_error = "yes"
                  libvirtd = "off"
  
+    - virt_edit:
+        type = virt_edit
+        new_vm_name = vm1
+        #whether test with a new guest
+        create_new_vm = no
+        #object to operate:right_name means a dom name or disk name;
+        #valid_name means a wrong name(a dom or disk that is nonexistence).
+        vm_ref = right_name
+        #if it is "yes",right_name is a disk name.
+        use_disk_name = no
+        disk_name = /tmp/foo.img
+        #add "LANG=C" before command or not.
+        change_lang = no
+        uri = ""
+        #give a null file_name or not.
+        file_names_type = hosts_file
+        #file name on windows.
+        win_file_names = /Windows/System32/drivers/etc/hosts
+        #file name on linux.
+        linux_file_names = /etc/hosts
+        wait_time = 50
+        #status of command is True means Fail,while False means PASS.
+        status_error = no
+        #modify file name or not.
+        addition_edit = no
+        foo_line = "#foo"
+        option = ""
+        #add args beyond range
+        more_args = ""
+        #shutdown domain before command test or after.
+        shutdown_later = no
+        #restart libvirt or not.
+        libvirtd_restart = no
+        undefine_vm = no
+        variants:
+            #didn't add any args after virt-edit.
+            - no_args:
+                vm_ref = ""
+                status_error = yes
+                file_names_type = ""
+            #give a valid name of dom.
+            - valid_domname:
+                vm_ref = valid_name
+                valid_name = 9999
+                status_error = yes
+            #use vm1 to test virt-edit.
+            - letter_number_vm_edit:
+                addition_edit = yes
+                create_new_vm = yes
+            #create a new guest named 12345678 to test virt-edit.
+            - number_vm_edit:
+                create_new_vm = yes
+                new_vm_name = "12345678"
+                addition_edit = yes
+                undefine_vm = yes
+            #give a valid name.
+            - symbol_domname:
+                vm_ref = valid_name
+                valid_name = "#"
+                status_error = yes
+            #create a new guest named -vm1 to test virt-edit.
+            - symbol_letter_number_vm_edit:
+                new_vm_name = -vm1
+                create_new_vm = yes
+                addition_edit = yes
+                undefine_vm = yes
+                option = "--"
+            #use vm1 to test virt-edit with libvirt restart.
+            - symbol_domname_libvirt_restart:
+                create_new_vm = yes
+                libvirtd_restart = yes
+                status_error = yes
+            #use vm1 and test virt-edit by domain uuid.
+            - dom_uuid_vm_edit:
+                create_new_vm = yes
+                vm_ref = uuid
+                addition_edit = yes
+                change_lang = yes
+            #add additional args after command:xyz.
+            - additional_args:
+                change_lang = yes
+                more_args = xyz
+                status_error = yes
+            #use vm1 to test virt-edit.
+            - symbol_domname_virt_edit_dom_running:
+                create_new_vm = yes
+                change_lang = yes
+                status_error = yes
+                shutdown_later = yes
+            #use vm1 and test virt-edit with no file_name.
+            - null_file_name_vm_edit:
+                change_lang = yes
+                status_error = yes
+                create_new_vm = yes
+                file_names_type = ""
+            #use vm1 and test virt-edit with domain disk name.
+            - vm_edit_by_dom_disk:
+                create_new_vm = yes
+                change_lang = yes
+                vm_ref = dom_disk
+                addition_edit = yes
+            #create an image file and test virt-edit.
+            - create_img_test:
+                change_lang = yes
+                use_disk_name = yes
+                status_error = yes
+            #use vm1 and test virt-edit with a wrong file_name.
+            - vm_edit_with_valid_file_name:
+                change_lang = yes
+                status_error = yes
+                create_new_vm = yes
+                file_names_type = valid_file_name
+
      - module_probe:
          type = module_probe
          # You can specify your own module list, though it is not needed 
usually.
-- 1.7.1

_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to