未验证 提交 b7594d4d 编写于 作者: L Lukáš Doktor

Merging pull request 1170

Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>

* https://github.com/autotest/tp-qemu:
  Rename the "rv" variants to avoid clashes
  Improve the host_reserve calculation in ksm_overcommit
  Use correct device in balloon_hotplug test
  Disabe multi_disk.all_drive_format_types on s390
  Enable the balloon_check.balloon_fix_value.balloon_base only on x86
  Only allow the qemu_guest_agent.isa_serial on x86 machines
  Filter seabios test to x86 only
  Change the target file name in live_backup test
  Enable the floppy_test only on i440fx
  Adjust config of nic_hotplug to work properly on s390x
  Remove unused variable "dev_type" from virtio_scsi_mq cfg
  Use "virtio_blk" in "virtio_scsi_mq" test for boot dev
  Fix the vmnames in time_manage test
  Filter unittest_kvmctl to x86 only
  Use the proper exception in cgroup test
  Increase check in live_snapshot_chain
  block_copy: Improve block regexp to work with recent qemu
......@@ -44,12 +44,13 @@ def run(test, params, env):
err = ""
vm = env.get_vm(params["main_vm"])
vm.verify_alive()
balloon_device = params.get("ballon_device", "virtio-balloon-pci")
error_context.context("Hotplug and unplug balloon device in a loop",
logging.info)
for i in xrange(int(params.get("balloon_repeats", 3))):
vm.devices.set_dirty()
new_dev = qdevices.QDevice("virtio-balloon-pci",
new_dev = qdevices.QDevice(balloon_device,
{'id': 'balloon%d' % idx},
parent_bus={'aobject': 'pci.0'})
......
......@@ -264,9 +264,21 @@ class BlockCopy(object):
blocks = self.vm.monitor.info("block")
try:
if isinstance(blocks, str):
# ide0-hd0: removable=1 locked=0 file=/tmp/test.img
image_regex = '%s.*\s+file=(\S*)' % self.device
image_file = re.findall(image_regex, blocks)
return image_file[0]
if image_file:
return image_file[0]
# ide0-hd0 (#block184): a b c
# or
# ide0-hd0 (#block184): a b c (raw)
image_file = re.findall("%s[^:]+: ([^(]+)\(?" % self.device,
blocks)
if image_file:
if image_file[0][-1] == ' ':
return image_file[0][:-1]
else:
return image_file[0]
for block in blocks:
if block['device'] == self.device:
......
......@@ -73,7 +73,7 @@
balloon_type_evict = evict
balloon_type_enlarge = enlarge
- balloon_fix_value:
no ppc64 aarch64
only i386, x86_64
only balloon_base
test_tags = "evict_to_0.5 enlarge_to_0.75 evict_to_0.8"
balloon_type_enlarge_to_0.75 = enlarge
......
......@@ -16,6 +16,9 @@
test_tags = "evict enlarge"
balloon_type_evict = evict
balloon_type_enlarge = enlarge
balloon_device = virtio-balloon-pci
s390x:
balloon_device = virtio-balloon-ccw
variants:
- @default:
balloon_repeats = 100
......
- floppy_test: install setup image_copy unattended_install.cdrom
type = floppy
no pseries
no q35
only i440fx
start_vm = no
floppies = "fl"
guest_floppy_path = "/dev/fd0"
......
......@@ -24,7 +24,7 @@
after_incremental += " verify_md5s verify_efficiency"
Linux:
create_cmd = "dd if=/dev/urandom of=FILE bs=128k count=100"
file_names = "/home/test"
file_names = "/home/test.img"
test_exists_cmd = "test -f FILE"
Windows:
create_cmd = "D:\coreutils\DummyCMD.exe FILE 1073741824 1"
......
......@@ -38,6 +38,8 @@
- long_chain:
need_reboot = yes
file_create = yes
# Check base, middle and last (set in code) images
check_base_image_image1 = yes
check_base_image_sn32 = yes
snapshot_chain = "image1"
snapshot_num = 64
......@@ -48,6 +48,7 @@
- all_drive_format_types:
# virtio-scsi driver support from RHEL6.3
no RHEL.3 RHEL.4 RHEL.5 RHEL.6.0 RHEL.6.1 RHEL.6.2
no s390x
stg_image_num = 4
stg_image_size = 100M
stg_params = "drive_format:ide,scsi,virtio,scsi-hd,usb2"
......
......@@ -9,7 +9,7 @@
run_dhclient = no
variants:
- nic_8139:
no ppc64 ppc64le
no ppc64, ppc64le, s390x
pci_model = rtl8139
match_string = "8139"
- nic_virtio:
......@@ -21,7 +21,7 @@
s390x:
pci_model = virtio-net-ccw
- nic_e1000:
no ppc64 ppc64le
no ppc64, ppc64le, s390x
pci_model = e1000
match_string = "Gigabit Ethernet Controller"
variants:
......
......@@ -134,8 +134,8 @@
- isa_serial:
# Windows guests don't support isa serial, disable it directly.
no Windows
# ppc64 and ppc64le platform doesn't support isa serial
no ppc64 ppc64le
# isa-serial is only supported on x86
only i386, x86_64
gagent_serial_type = isa
serials += " org.qemu.guest_agent.0"
gagent_start_cmd = "pgrep qemu-ga || qemu-ga -d -m isa-serial -p /dev/ttyS1"
- seabios: install setup image_copy unattended_install.cdrom
no Host_RHEL.m5
no ppc64 ppc64le aarch64
only i386, x86_64
type = seabios
start_vm = no
restart_vm = no
......
......@@ -13,11 +13,11 @@
virtio_port_name_prefix_virt-tests-vm1 = "com.redhat.spice."
variants:
-RHEL.6.devel.x86_64:
- RHEL-6-devel-x86_64:
image_name_vm2 = images/rhel6devel-64_client
-RHEL.6.devel.i386:
- RHEL-6-devel-i386:
image_name_vm2 = images/rhel6devel-32_client
-RHEL.7.devel.x86_64:
- RHEL-7-devel-x86_64:
image_name_vm2 = images/rhel7devel-64_client
variants:
- fullscreen_setup:
......
- unit_test_kvmctl:
no JeOS
only i386, x86_64
type = unittest_kvmctl
vms = ''
profilers = ''
......
......@@ -8,6 +8,4 @@
login_timeout = 240
start_vm = no
image_size_extra_images = 512M
q35:
system_image_drive_format = ahci
dev_type = q35-pcihost
system_image_drive_format = virtio_blk
......@@ -1665,7 +1665,7 @@ def run(test, params, env):
try:
out = process.system_output("cat /proc/%s/task/*/stat" %
pid)
except exceptions.CmdError:
except process.CmdError:
out = None
else:
break
......
......@@ -9,6 +9,8 @@ import aexpect
from autotest.client.shared import error
from autotest.client.shared import utils
from avocado.utils import process
from virttest import utils_misc, utils_test, env_process, data_dir
from virttest.staging import utils_memory
......@@ -431,11 +433,14 @@ def run(test, params, env):
# host_reserve: mem reserve kept for the host system to run
host_reserve = int(params.get("ksm_host_reserve", -1))
if (host_reserve == -1):
# default host_reserve = MemAvailable + one_minimal_guest(128MB)
try:
available = utils_memory.read_from_meminfo("MemAvailable")
except process.CmdError: # ancient kernels
utils_memory.drop_caches()
available = utils_memory.read_from_meminfo("MemFree")
# default host_reserve = UsedMem + one_minimal_guest(128MB)
# later we add 64MB per additional guest
host_reserve = ((utils_memory.memtotal() -
utils_memory.read_from_meminfo("MemFree")) /
1024 + 128)
host_reserve = ((utils_memory.memtotal() - available) / 1024 + 128)
# using default reserve
_host_reserve = True
else:
......
......@@ -54,7 +54,7 @@ def run(test, params, env):
curr_time = []
timedrift = []
totaldrift = []
vmnames = ["virt-tests-vm1"]
vmnames = [params["main_vm"]]
# Run some load on the host
logging.info("Starting load on host.")
......@@ -86,8 +86,7 @@ def run(test, params, env):
while itr <= int(params["max_itrs"]):
for vmid, se in enumerate(sessions):
# Get the respective vm object
vmname = "virt-tests-vm%d" % (vmid + 1)
vm = env.get_vm(vmname)
vm = env.get_vm(vmnames[vmid])
# Run current iteration
logging.info(
"Rebooting:vm%d iteration %d " % ((vmid + 1), itr))
......
......@@ -65,7 +65,8 @@ def run(test, params, env):
images_num = int(num_queues)
extra_image_size = params.get("image_size_extra_images", "512M")
system_image = params.get("images")
system_image_drive_format = params.get("system_image_drive_format", "ide")
system_image_drive_format = params.get("system_image_drive_format",
"virtio_blk")
params["drive_format_%s" % system_image] = system_image_drive_format
error.context("Boot up guest with block devcie with num_queues"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册