On 2013年11月26日 11:49, Jincheng Miao wrote:
Add:
* repos/domain/blkstatsflags.py
* repos/domain/block_iotune.py
* repos/domain/block_peek.py
* repos/domain/block_resize.py
* repos/domain/domain_blkio.py
* cases/basic_blockjob.conf
Modify: replace virsh commands to calling api in test function
* repos/domain/blkstats.py
* repos/domain/domain_blkinfo.py
---
cases/basic_blockjob.conf | 87 ++++++++++++++++++++++
repos/domain/blkstats.py | 2 -
repos/domain/blkstatsflags.py | 63 ++++++++++++++++
repos/domain/block_iotune.py | 118 +++++++++++++++++++++++++++++
repos/domain/block_peek.py | 69 +++++++++++++++++
repos/domain/block_resize.py | 88 ++++++++++++++++++++++
repos/domain/domain_blkinfo.py | 87 ++++++++++++----------
repos/domain/domain_blkio.py | 165 +++++++++++++++++++++++++++++++++++++++++
8 files changed, 639 insertions(+), 40 deletions(-)
create mode 100644 cases/basic_blockjob.conf
create mode 100644 repos/domain/blkstatsflags.py
create mode 100644 repos/domain/block_iotune.py
create mode 100644 repos/domain/block_peek.py
create mode 100644 repos/domain/block_resize.py
create mode 100644 repos/domain/domain_blkio.py
diff --git a/cases/basic_blockjob.conf b/cases/basic_blockjob.conf
new file mode 100644
index 0000000..65af2c3
--- /dev/null
+++ b/cases/basic_blockjob.conf
@@ -0,0 +1,87 @@
+domain:install_linux_cdrom
+ guestname
+ $defaultname
+ guestos
+ $defaultos
+ guestarch
+ $defaultarch
+ vcpu
+ $defaultvcpu
+ memory
+ $defaultmem
+ hddriver
+ $defaulthd
+ nicdriver
+ $defaultnic
+ macaddr
+ 54:52:00:45:c3:8a
+
+domain:install_linux_check
+ guestname
+ $defaultname
+ virt_type
+ $defaulthv
+ hddriver
+ $defaulthd
+ nicdriver
+ $defaultnic
+
+domain:block_iotune
+ guestname
+ $defaultname
+ bytes_sec
+ 100000
+ iops_sec
+ 0
+
+domain:block_iotune
+ guestname
+ $defaultname
+ bytes_sec
+ 0
+ iops_sec
+ 1000
+
+domain:block_peek
+ guestname
+ $defaultname
+
+domain:block_peek
+ guestname
+ $defaultname
+
+domain:block_resize
+ guestname
+ $defaultname
+ diskpath
+ /var/lib/libvirt/images/libvirt-test-api
The hardcode is not good. when I tested this testcase, my guest doesn't
have such disk in the path
+ disksize
+ 1G
+
+domain:blkstats
+ guestname
+ $defaultname
+
+domain:blkstatsflags
+ guestname
+ $defaultname
+ flags
+ 0
+
+domain:domain_blkinfo
+ guestname
+ $defaultname
+ blockdev
+ /var/lib/libvirt/images/libvirt-test-api
The same.
+
+domain:domain_blkio
+ guestname
+ $defaultname
+ weight
+ 500
+
+domain:undefine
+ guestname
+ $defaultname
+
+options cleanup=enable
Could you remove the trailing spaces in the codes.
And please split this big patch into two ones, one for new testcases,
the other for the change to the existed testcases.
Guannan