Skip to contentSkip to conversation

KVM Test: Add a subtest lvm

PATCH New Lucas Meneghel Rodrigues 1 participant 1 message May 23, 2011 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 KVM Test: Add a subtest lvm

From: Qingtang Zhou <[email protected]>

Changes from v1:
* Made the test use more current kvm autotest api, namely:
- Error contexts, and session.cmd for shorter, cleaner code
- Removed pre command, as the functionality needed for image_create was implemented on the previous patch

This test sets up an lvm over two images and then format the lvm and finally checks the fs using fsck.

Signed-off-by Yolkfull Chow

Remove the progress of filling up.
Add a params of clean which could prevent the umount and volume removing command and let this case usd by the following benchmark or stress test. Add the dbench into the lvm tests.

This test depends on fillup_disk test and ioquit test.

---
 client/tests/kvm/tests_base.cfg.sample |   48 ++++++++++++++++++
 client/virt/tests/lvm.py               |   84 ++++++++++++++++++++++++++++++++
 2 files changed, 132 insertions(+), 0 deletions(-)
 create mode 100644 client/virt/tests/lvm.py
client/tests/kvm/tests_base.cfg.sample +48 -0
index 5713513..d1a188d 100644
@@ -879,6 +879,46 @@ variants:
         fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1 oflag=direct"
         kill_vm = yes
 
+    - lvm:
+        only Linux
+        images += ' stg1 stg2'
+        image_name_stg1 = storage_4k
+        image_cluster_size_stg1 = 4096
+        image_size_stg1 = 1G
+        image_format_stg1 = qcow2
+        image_name_stg2 = storage_64k
+        image_cluster_size_stg2 = 65536
+        image_size_stg2 = 1G
+        image_format_stg2 = qcow2
+        guest_testdir = /mnt
+        disks = "/dev/sdb /dev/sdc"
+        kill_vm = no
+        post_command_noncritical = no
+        variants:
+            lvm_create:
+                type = lvm
+                force_create_image_stg1 = yes
+                force_create_image_stg2 = yes
+                clean = no
+            lvm_fill: lvm_create
+                type = fillup_disk
+                force_create_image_stg1 = no
+                force_create_image_stg2 = no
+                guest_testdir = /mnt/kvm_test_lvm
+                fillup_timeout = 120
+                fillup_size = 20
+                fillup_cmd = "dd if=/dev/zero of=%s/fillup.%d bs=%dM count=1 oflag=direct"
+            lvm_ioquit: lvm_create
+                type = ioquit
+                force_create_image_stg1 = no
+                force_create_image_stg2 = no
+                kill_vm = yes
+                background_cmd = "for i in 1 2 3 4; do (dd if=/dev/urandom of=/mnt/kvm_test_lvm/file bs=102400 count=10000000 &); done"
+                check_cmd = pgrep dd
+                clean = yes
+                remove_image_stg1 = yes
+                remove_image_stg2 = yes
+
     - ioquit:
         only Linux
         type = ioquit
@@ -1656,6 +1696,8 @@ variants:
                             md5sum_1m_cd1 = 127081cbed825d7232331a2083975528
                         fillup_disk:
                             fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
+                        lvm.lvm_fill:
+                            fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
 
                     - 4.7.x86_64:
                         no setup autotest
@@ -1677,6 +1719,8 @@ variants:
                             md5sum_1m_cd1 = 58fa63eaee68e269f4cb1d2edf479792
                         fillup_disk:
                             fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
+                        lvm.lvm_fill:
+                            fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
 
                     - 4.8.i386:
                         no setup autotest
@@ -1696,6 +1740,8 @@ variants:
                             sys_path = "/sys/class/net/%s/driver"
                         fillup_disk:
                             fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
+                        lvm.lvm_fill:
+                            fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
 
 
                     - 4.8.x86_64:
@@ -1716,6 +1762,8 @@ variants:
                             sys_path = "/sys/class/net/%s/driver"
                         fillup_disk:
                             fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
+                        lvm.lvm_fill:
+                            fillup_cmd = "dd if=/dev/zero of=/%s/fillup.%d bs=%dM count=1"
 
 
                     - 5.3.i386:
client/virt/tests/lvm.py new file +84 -0

84 lines not on this page · raw message

Signature · 1 line
1.7.5.1