More docstring fixes

Fix some extra problems with docstrings in the code tree.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 e9599b1c
......@@ -2,7 +2,7 @@
"""
Program to help setup kvm test environment
@copyright: Red Hat 2010
:copyright: Red Hat 2010
"""
import os
import sys
......
......@@ -2,7 +2,7 @@
"""
Populate/update config files for virt-test
@copyright: Red Hat 2013
:copyright: Red Hat 2013
"""
import os
import sys
......
......@@ -2,7 +2,7 @@
"""
Program to help setup kvm test environment
@copyright: Red Hat 2010
:copyright: Red Hat 2010
"""
import os
import sys
......
"""
KVM cdrom test
@author: Amos Kong <akong@redhat.com>
@author: Lucas Meneghel Rodrigues <lmr@redhat.com>
@author: Lukas Doktor <ldoktor@redhat.com>
@author: Jiri Zupka <jzupka@redhat.com>
@copyright: 2011 Red Hat, Inc.
:author: Amos Kong <akong@redhat.com>
:author: Lucas Meneghel Rodrigues <lmr@redhat.com>
:author: Lukas Doktor <ldoktor@redhat.com>
:author: Jiri Zupka <jzupka@redhat.com>
:copyright: 2011 Red Hat, Inc.
"""
import logging
import re
......
"""
cgroup autotest test (on KVM guest)
@author: Lukas Doktor <ldoktor@redhat.com>
@copyright: 2011 Red Hat, Inc.
:author: Lukas Doktor <ldoktor@redhat.com>
:copyright: 2011 Red Hat, Inc.
"""
import logging
import os
......@@ -120,7 +120,7 @@ def run_cgroup(test, params, env):
"""
Removes no_disks scsi_debug disks from the last one.
:param no_disks: How many disks to remove
@note: params['cgroup_rmmod_scsi_debug'] == "yes" => rmmod scsi_debug
:note: params['cgroup_rmmod_scsi_debug'] == "yes" => rmmod scsi_debug
"""
utils.system("echo -%d > /sys/bus/pseudo/drivers/scsi_debug/add_host"
% no_disks)
......@@ -175,7 +175,7 @@ def run_cgroup(test, params, env):
"""
Defines $no_vms in params
:param no_vms: Desired number of VMs
@note: All defined VMs are overwritten.
:note: All defined VMs are overwritten.
"""
params['vms'] = ""
for i in range(no_vms):
......@@ -188,7 +188,7 @@ def run_cgroup(test, params, env):
"""
Sets blkio.weight for each VM and measure the actual distribution
of read/write speeds.
@note: VMs are created in test
:note: VMs are created in test
:param cfg: cgroup_test_time - test duration '60'
:param cfg: cgroup_weights - list of R/W weights '[100, 1000]'
:param cfg: cgroup_limit{ ,_read,_write} - allowed R/W threshold '0.1'
......@@ -345,8 +345,8 @@ def run_cgroup(test, params, env):
Tests the blkio.throttle.{read,write}_bps_device cgroup capability.
It sets speeds accordingly to current scenario and let it run for
$test_time seconds. Afterwards it verifies whether the speeds matches.
@note: VMs are created in test
@note: Uses scsi_debug disks
:note: VMs are created in test
:note: Uses scsi_debug disks
:param cfg: cgroup_test_time - test duration '60'
:param cfg: cgroup_limit{ ,_read,_write} - allowed R/W threshold '0.1'
:param cfg: cgroup_speeds list of simultaneous speeds
......@@ -372,8 +372,8 @@ def run_cgroup(test, params, env):
It sets speeds accordingly to current scenario and let it run for
$test_time seconds. Afterwards it verifies whether the speeds matches.
All scenarios have to have the same number of speeds (= no_vms).
@note: VMs are created in test
@note: Uses scsi_debug disks
:note: VMs are created in test
:note: Uses scsi_debug disks
:param cfg: cgroup_test_time - test duration '60'
:param cfg: cgroup_limit{ ,_read,_write} - allowed R/W threshold '0.1'
:param cfg: cgroup_speeds list of lists defining [[vm1],[vm2],..]]
......@@ -591,7 +591,7 @@ def run_cgroup(test, params, env):
Each VM have double the previous created one (1, 2, 4, 8..) up to
twice physical CPUs overcommit. cfs quotas are set to 1/2 thus VMs
should consume exactly 100%. It measures the difference.
@note: VMs are created in test
:note: VMs are created in test
:param cfg: cgroup_test_time - test duration '60'
:param cfg: cgroup_limit - allowed threshold '0.05' (5%)
"""
......@@ -1416,9 +1416,9 @@ def run_cgroup(test, params, env):
Tests devices.list capability. It tries hot-adding disk with different
devices.list permittions and verifies whether it pass or fails.
It tests booth RO and RW mode.
@note: VM is destroyed after this test (in order to remove the attached
:note: VM is destroyed after this test (in order to remove the attached
disks)
@note: supported monitor CMDs are pci_add, drive_add and RH-drive_add
:note: supported monitor CMDs are pci_add, drive_add and RH-drive_add
RH-QMP-drive_add
"""
def _set_permissions(cgroup, permissions):
......
"""
multi_disk test for Autotest framework.
@copyright: 2011-2012 Red Hat Inc.
:copyright: 2011-2012 Red Hat Inc.
"""
import logging
import re
......@@ -23,7 +23,7 @@ def _range(buf, n=None):
range1-3 ... ordinary python range()
range4 ... multiplies the occurrence of each value
(range(0,4,1,2) => [0,0,1,1,2,2,3,3])
@raise ValueError: In case incorrect values are given.
:raise ValueError: In case incorrect values are given.
:return: List of int values. In case it can't substitute 'n'
it returns the original string.
"""
......
......@@ -13,7 +13,7 @@ def run_negative_create(test, params, env):
:param test: kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
@raise VMCreateSuccess: in case that vm.create() passed
:raise VMCreateSuccess: in case that vm.create() passed
This test is designed to check if qemu exits on passed invalid
argument values.
......
......@@ -2,8 +2,8 @@
"""
Step file creator/editor.
@copyright: Red Hat Inc 2009
@author: mgoldish@redhat.com (Michael Goldish)
:copyright: Red Hat Inc 2009
:author: mgoldish@redhat.com (Michael Goldish)
@version: "20090401"
"""
......
"""
Utilities to perform automatic guest installation using step files.
@copyright: Red Hat 2008-2009
:copyright: Red Hat 2008-2009
"""
import os
......
......@@ -2,7 +2,7 @@
"""
Collection of virtio_console and virtio_serialport tests.
@copyright: 2010-2012 Red Hat Inc.
:copyright: 2010-2012 Red Hat Inc.
"""
from collections import deque
import array
......@@ -37,7 +37,7 @@ def run_virtio_console(test, params, env):
:param test: kvm test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment
@raise error.TestNAError: if function with test_$testname is not present
:raise error.TestNAError: if function with test_$testname is not present
"""
#
# General helpers
......@@ -220,7 +220,7 @@ def run_virtio_console(test, params, env):
def test_multi_open():
"""
Try to open the same port twice.
@note: On linux it should pass with virtconsole and fail with
:note: On linux it should pass with virtconsole and fail with
virtserialport. On Windows booth should fail
:param cfg: virtio_console_params - which type of virtio port to test
:param cfg: virtio_port_spread - how many devices per virt pci (0=all)
......@@ -355,7 +355,7 @@ def run_virtio_console(test, params, env):
def test_lseek():
"""
Tests the correct handling of lseek
@note: lseek should fail
:note: lseek should fail
:param cfg: virtio_console_params - which type of virtio port to test
:param cfg: virtio_port_spread - how many devices per virt pci (0=all)
"""
......@@ -802,7 +802,7 @@ def run_virtio_console(test, params, env):
def _s4():
"""
Hibernate (S4) and resume the VM.
@note: data loss is handled differently in this case. First we
:note: data loss is handled differently in this case. First we
set data loss to (almost) infinity. After the resume we
periodically check the number of transferred and lost data.
When there is no loss and number of transferred data is
......@@ -1755,7 +1755,7 @@ def run_virtio_console(test, params, env):
"""
Try to gently shutdown the machine while sending data through virtio
port.
@note: VM should shutdown safely.
:note: VM should shutdown safely.
:param cfg: virtio_console_params - which type of virtio port to test
:param cfg: virtio_port_spread - how many devices per virt pci (0=all)
:param cfg: virtio_console_method - reboot method (shell, system_reset)
......@@ -1811,7 +1811,7 @@ def run_virtio_console(test, params, env):
def test_unplugged_restart():
"""
Try to unplug all virtio ports and gently restart machine
@note: VM should shutdown safely.
:note: VM should shutdown safely.
:param cfg: virtio_console_params - which type of virtio port to test
:param cfg: virtio_port_spread - how many devices per virt pci (0=all)
:param cfg: virtio_console_method - reboot method (shell, system_reset)
......@@ -1872,7 +1872,7 @@ def run_virtio_console(test, params, env):
"""
This dummy test only removes the guest_worker_script. Use this it
when you use the old image with a new guest_worker version.
@note: The script name might differ!
:note: The script name might differ!
"""
vm = env.get_vm(params["main_vm"])
session = vm.wait_for_login()
......
......@@ -14,7 +14,7 @@ def run_win_disk_write(test, params, env):
:param test: QEMU test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
@note: Crystal Disk mark is BSD licensed software
:note: Crystal Disk mark is BSD licensed software
http://crystalmark.info/software/CrystalDiskMark/manual-en/License.html
:see:: http://crystalmark.info/software/CrystalDiskMark/index-e.html
"""
......
......@@ -2,7 +2,7 @@
"""
Populate/update config files for virt-test
@copyright: Red Hat 2013
:copyright: Red Hat 2013
"""
import os
import sys
......
"""
Configurable on-guest dd test.
@author: Lukas Doktor <ldoktor@redhat.com>
@copyright: 2012 Red Hat, Inc.
:author: Lukas Doktor <ldoktor@redhat.com>
:copyright: 2012 Red Hat, Inc.
"""
import logging
from autotest.client.shared import error
......
......@@ -63,7 +63,7 @@ def run_iofuzz(test, params, env):
process abnormally ends, the test fails.
:param inst_list: List of instructions that will be executed.
@raise error.TestFail: If the VM process dies in the middle of the
:raise error.TestFail: If the VM process dies in the middle of the
fuzzing procedure.
"""
for (op, operand) in inst_list:
......
"""
@author: Golita Yue <gyue@redhat.com>
@author: Amos Kong <akong@redhat.com>
:author: Golita Yue <gyue@redhat.com>
:author: Amos Kong <akong@redhat.com>
"""
import logging
import time
......
......@@ -62,7 +62,7 @@ def run_trans_hugepage_defrag(test, params, env):
:param relative_path: Path of the feature relative to THP config base.
:param test_config: Object that keeps track of THP config state.
@raise: error.TestFail, if can't change feature status
:raise: error.TestFail, if can't change feature status
"""
feature_path = os.path.join(test_config.thp_path, feature_path)
feature_file = open(feature_path, 'r')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册