提交 6347e144 编写于 作者: X Xu Tian 提交者: Lucas Meneghel Rodrigues

qemu.tests: update drive_mirror test cfg

Update drive_mirror test configuration to make it stablly

changes from v1:
    fix some coding style issue
Signed-off-by: NXu Tian <xutian@redhat.com>
上级 b3264915
......@@ -2,7 +2,7 @@
no Host_RHEL.5
no Host_RHEL.6.1
no Host_RHEL.6.2
only qcow2
no raw qed vmdk
type = drive_mirror
monitor_type = qmp
monitors = qmp1
......@@ -27,13 +27,14 @@
# default speed unit is B/s, for 10MB/s please set speed to '10M'
target_format_image1 = "qcow2"
create_mode_image1 = "absolute-paths"
target_image_image1 = "/tmp/target1"
target_image_image1 = "images/target1"
check_event = no
tmp_dir = "/tmp"
variants:
- simple_test:
type = drive_mirror_simple
repeat_times = 3
cancel_timeout = 3
cancel_timeout = 5
variants:
- cancel:
before_steady = "cancel"
......@@ -59,13 +60,12 @@
dd_cmd = "dd if=/dev/zero bs=1024 count=1024 of=tmp%s.file"
- with_stress:
type = drive_mirror_stress
reopen_timeout = 360
reopen_timeout = 600
variants:
- heavyload:
tmp_dir = "/tmp"
download_link = http://weather.ou.edu/~apw/projects/stress/stress-1.0.4.tar.gz
md5sum = a607afa695a511765b40993a64c6e2f4
install_cmd = "tar -xzvf %s/stress-1.0.4.tar.gz -C ./ && cd stress-1.0.4 && ./configure --prefix=/usr && make && make install "
install_cmd = "tar -xzvf ${tmp_dir}/stress-1.0.4.tar.gz -C ./ && cd stress-1.0.4 && ./configure --prefix=/usr && make && make install "
config_cmd = ""
app_check_cmd = "stress --help"
start_cmd = "stress --cpu 4 --io 4 --vm 2 --vm-bytes 256M --quiet &"
......@@ -89,23 +89,26 @@
after_reopen = "reboot verify_alive"
- dd:
app_check_cmd = "dd --help"
start_cmd = "(dd if=/dev/urandom of=/tmp/tmp.img bs=4k count=500000 oflag=direct &)"
start_cmd = "dd if=/dev/urandom of=/tmp/dd.img bs=4k count=500000"
check_cmd = "pidof dd"
stop_cmd = "killall -g dd;rm -f /tmp/tmp.img"
stop_cmd = "pkill -g dd && rm -rf /tmp/dd*"
before_start = "load_stress"
when_steady = "reopen"
after_reopen = "reboot verify_alive"
- with_reboot:
type = drive_mirror_reboot
when_steady = "reopen stop_reset"
when_steady = "reopen"
after_reopen = "reboot verify_alive"
- with_powerdown:
type = drive_mirror_powerdown
app_check_cmd = "uname"
start_cmd = 'sh -c "wget -c https://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.14.tar.gz -O /mnt/Linux.tgz && '
start_cmd += 'tar -xzvf /mnt/Linux.tgz -C /mnt && cd /mnt/linux-2.6.35.14 && make defconfig && make && make modules"'
check_cmd = 'pidof -s make'
stop_cmd = 'pkill sh;rm -rf /mnt/linux-2.6.35.14'
app_check_cmd = "test -d ${tmp_dir}/linux-2.6.35.14"
download_link = "https://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.14.tar.gz"
md5sum = "15e4021ffcb47b93c218083e1f2734a7"
install_cmd = "tar xzvf ${tmp_dir}/linux-2.6.35.14.tar.gz -C ${tmp_dir}/"
config_cmd = "cd ${tmp_dir}/linux-2.6.35.14 && make defconfig"
start_cmd = "cd ${tmp_dir}/linux-2.6.35.14 && make clean && make -j `grep processor /proc/cpuinfo|wc -l` && make modules"
check_cmd = "pidof make"
stop_cmd = "pkill -g make && rm -rf ${tmp_dir}/linux*"
before_start = "load_stress"
when_steady = "powerdown"
after_reopen ="verify_alive"
......@@ -62,7 +62,6 @@ class DriveMirror(block_copy.BlockCopy):
reopen target image, then check if image file of the device is
target images;
"""
params = self.parser_test_args()
target_format = params["target_format"]
timeout = params["reopen_timeout"]
......@@ -105,8 +104,8 @@ class DriveMirror(block_copy.BlockCopy):
timeout = params.get("wait_timeout")
if self.vm.monitor.protocol == "qmp":
self.vm.monitor.clear_event("BLOCK_JOB_READY")
steady =utils_misc.wait_for(self.is_steady, step=2.0,
timeout=timeout)
steady = utils_misc.wait_for(self.is_steady, step=2.0,
timeout=timeout)
if not steady:
raise error.TestFail("Wait mirroring job ready "
"timeout in %ss" % timeout)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册