Skip to content

Commit

Permalink
Many typo fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Ana Guerrero Lopez <[email protected]>
  • Loading branch information
ana committed Aug 17, 2021
1 parent 7b54fc4 commit 08df0e6
Show file tree
Hide file tree
Showing 89 changed files with 275 additions and 275 deletions.
4 changes: 2 additions & 2 deletions avocado_vt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def insert_dirs_to_path(dirs):


def find_subtest_dirs(other_subtests_dirs, bindir, ignore_files=None):
"""Find directories containining subtests.
"""Find directories containing subtests.
:param other_subtests_dirs: space separate list of directories
:type other_subtests_dirs: string
Expand Down Expand Up @@ -168,7 +168,7 @@ def _log_parameters(self):

def _get_subtest_dirs(self):
"""
Get list of directories containining subtests.
Get list of directories containing subtests.
"""
test_filter = bootstrap.test_filter
subtest_dirs = find_subtest_dirs(self.params.get("other_tests_dirs",
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(TEST_SUITE_ROOT/shared/data)
destination_uncompressed (optional) = Location of the uncompressed file
relative to the data directory (TEST_SUITE_ROOT/shared/data)
uncompress_cmd (optionl) = Command that needs to be executed with the
uncompress_cmd (optional) = Command that needs to be executed with the
compressed file as a parameter
:copyright: Red Hat 2012
Expand Down
2 changes: 1 addition & 1 deletion scripts/github/github_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ def set_labels(self, value):

def del_labels(self):
"""
Remove all lbels from an issue
Remove all labels from an issue
"""
self._github_issue['github_issue'].delete_labels()
# Force retrieval of changed item
Expand Down
2 changes: 1 addition & 1 deletion scripts/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def getTtestPvalue(self, fs_dict1, fs_dict2, paired=None, ratio=None):
ret = []
s1 = self._process_files(fs_dict1, self._get_list_self, merge=False)
s2 = self._process_files(fs_dict2, self._get_list_self, merge=False)
# s*[line][col] contians items (line*col) of all sample files
# s*[line][col] contains items (line*col) of all sample files

for line in range(len(s1)):
tmp = []
Expand Down
6 changes: 3 additions & 3 deletions scripts/scan_results.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
Script to fetch test status info from sqlit data base. Before use this
script, avocado We must be lanuch with '--journal' option.
script, avocado We must be launch with '--journal' option.
"""

from __future__ import division
Expand Down Expand Up @@ -53,7 +53,7 @@ def fetch_data(db_file=".journal.sqlite"):
cur = con.cursor()
cur.execute("select tag, time, action, status from test_journal")
while True:
# First record contation start info, second contain end info
# First record contains start info, second contains end info
# merged start info and end info into one record.
data = cur.fetchmany(2)
if not data:
Expand Down Expand Up @@ -81,7 +81,7 @@ def fetch_data(db_file=".journal.sqlite"):


def print_data(records, skip_timestamp=False):
""" Print formated tests status info"""
""" Print formatted tests status info"""
if not records:
return
if not skip_timestamp:
Expand Down
2 changes: 1 addition & 1 deletion selftests/unit/test_cartesian_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _checkConfigDump(self, config, dump):
else:
df = open(dumppath, 'r')
# we could have used pickle, but repr()-based dumps are easier to
# enerate, debug, and edit
# generate, debug, and edit
dumpdata = eval(df.read())

p = cartesian_config.Parser(configpath)
Expand Down
2 changes: 1 addition & 1 deletion selftests/unit/test_cartesian_config_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_cfg_as_dict(path, drop_only=True, drop_conditional_assigment=True):
By putting the content of file within a "variants:" context.
Optionally (default) also drops all instances of "only" statements,
and optional assigments, ie:
and optional assignments, ie:
section_name:
foo = bar
Expand Down
6 changes: 3 additions & 3 deletions selftests/unit/test_libvirt_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _nodedev_dumpxml(name, options="", to_file=None, **dargs):

def setUp(self):
self.dummy_virsh = FakeVirshFactory()
# make a tmp_dir to store informations.
# make a tmp_dir to store information.
LibvirtXMLTestBase.__doms_dir__ = os.path.join(data_dir.get_tmp_dir(),
'domains')
if not os.path.isdir(LibvirtXMLTestBase.__doms_dir__):
Expand Down Expand Up @@ -878,14 +878,14 @@ def test_vm_get_modify(self):
self.assertFalse(serial1 == serial2)
serial1.update_target(0, port="1")
self.assertEqual(serial1, serial2)
# Exercize bind mode
# Exercise bind mode
self.assertEqual(serial3.type_name, 'tcp')
source_connect = serial3.sources[0]
self.assertEqual(source_connect, {'mode': "connect", 'host': '1.2.3.4',
'service': '2445'})
self.assertEqual(serial3.protocol_type, 'raw')
self.assertEqual(serial3.targets[0]['port'], '2')
# Exercize udp type
# Exercise udp type
self.assertEqual(serial4.type_name, 'udp')
source_bind = serial4.sources[0]
source_connect = serial4.sources[1]
Expand Down
4 changes: 2 additions & 2 deletions selftests/unit/test_utils_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def what_func(propertea):
apendex_set.update(props)
apendex_set.update(more_props)
virtiface = self.VirtIface(apendex_set)
# str(props) guarantees apendex set wasn't incorporated
# str(props) guarantees appendix set wasn't incorporated
self.loop_assert(virtiface, list(props.keys()), what_func)

def test_mac_completer(self):
Expand Down Expand Up @@ -630,7 +630,7 @@ def test_06_VirtNet(self):

def test_07_VirtNet(self):
"""
Release mac from beginning, midle, and end, re-generate + verify value
Release mac from beginning, middle, and end, re-generate + verify value
"""
self.zero_counter(1)
beginning_params = utils_params.Params({
Expand Down
2 changes: 1 addition & 1 deletion selftests/unit/test_xml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def test_MappingTreeBuilder_standalone(self):

def test_TemplateXMLTreeBuilder_nosub(self):
txtb = xml_utils.TemplateXMLTreeBuilder()
# elementree pukes on identifiers starting with $
# elementtree pukes on identifiers starting with $
txtb.feed(self.RESULTCHECK)
et = txtb.close()
result = ElementTree.tostring(et)
Expand Down
2 changes: 1 addition & 1 deletion selftests/unit/unittest_data/testcfg.huge/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ image_unbootable_pattern = "Hard Disk.*not a bootable disk"
# Iscsi support related params. Please fill them depends on your environment.
# For both iscsi and emulated iscsi should have this option:
# target: target name of your iscsi device
# device_id(optinal): The number of your device if the iscsi device already formated
# device_id(optinal): The number of your device if the iscsi device already formatted
# For iscsi device only:
# portal_ip: iscsi server ip
# initiator: initiator name
Expand Down
4 changes: 2 additions & 2 deletions virttest/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def haz_defcon(datadir, imagesdir, isosdir, tmpdir):
tmp_type = utils_selinux.get_context_of_file(tmpdir)
tmp_type = utils_selinux.get_type_from_context(tmp_type)

# hard-coded values b/c only four of them and widly-used
# hard-coded values b/c only four of them and wildly-used
if data_type == 'virt_var_lib_t':
if images_type == 'virt_image_t':
if isos_type == 'virt_content_t':
Expand All @@ -703,7 +703,7 @@ def set_defcon(datadir, imagesdir, isosdir, tmpdir):
# between on-disk and defaults. Only interested in top-level
# object [0] and the context it would change to [2]
data_type = utils_selinux.diff_defcon(datadir, False)[0][2]
# Extrach only the type
# Extract only the type
existing_data = utils_selinux.get_type_from_context(data_type)
except IndexError:
existing_data = None
Expand Down
4 changes: 2 additions & 2 deletions virttest/build_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class PatchParamHelper(PatchHelper):
"""
Helps to deal with patches specified in cartersian config files
This class attempts to make it simple to patch source coude, by using a
This class attempts to make it simple to patch source code, by using a
naming standard that follows this basic syntax:
[<git_repo>|<local_src>|<local_tar>|<remote_tar>]_<name>_patches
Expand Down Expand Up @@ -811,7 +811,7 @@ class GnuSourceBuildParamHelper(GnuSourceBuildHelper):
"""
Helps to deal with gnu_autotools build helper in cartersian config files
This class attempts to make it simple to build source coude, by using a
This class attempts to make it simple to build source code, by using a
naming standard that follows this basic syntax:
[<git_repo>|<local_src>]_<name>_<option> = value
Expand Down
6 changes: 3 additions & 3 deletions virttest/cartesian_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def match(self, ctx, ctx_set):
return False

def might_match(self, ctx, ctx_set, descendant_labels):
# There is some posibility to match in children blocks.
# There is some possibility to match in children blocks.
for word in self.filter:
for block in word:
if not _might_match_adjacent(block, ctx, ctx_set,
Expand Down Expand Up @@ -1505,7 +1505,7 @@ def no_filter(self, variant):

def assign(self, key, value):
"""
Apply an assigment programatically and keep track of it.
Apply an assignment programatically and keep track of it.
Equivalent to parse a "key = value" line.
Expand Down Expand Up @@ -2238,7 +2238,7 @@ def compare_string(str1, str2):
:param str1: The first string
:param str2: The second string
:Return: Rteurn -1, when str1< str2
:Return: Return -1, when str1< str2
0, when str1 = str2
1, when str1> str2
"""
Expand Down
4 changes: 2 additions & 2 deletions virttest/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_opt(opt, name):
"""
Compatibility handler for options in either argparse.Namespace or dict
:param opt: either an argpase.Namespace instance or a dict
:param opt: either an argparse.Namespace instance or a dict
:param name: the name of the attribute or key
"""
if isinstance(opt, argparse.Namespace):
Expand All @@ -74,7 +74,7 @@ def set_opt(opt, name, value):
"""
Compatibility handler for options in either argparse.Namespace or dict
:param opt: either an argpase.Namespace instance or a dict
:param opt: either an argparse.Namespace instance or a dict
:param name: the name of the attribute or key
:param value: the value to be set
"""
Expand Down
8 changes: 4 additions & 4 deletions virttest/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def guest_numa_check(vm, exp_vcpu):
def get_load_per(session=None, iterations=2, interval=10.0):
"""
Get the percentage of load in Guest/Host
:param session: Guest Sesssion
:param session: Guest Session
:param iterations: iterations
:param interval: interval between load calculation
:return: load of system in percentage
Expand Down Expand Up @@ -861,7 +861,7 @@ def get_cpu_vendor(cpu_info="", verbose=True):

def get_recognized_cpuid_flags(qemu_binary="/usr/libexec/qemu-kvm"):
"""
Get qemu recongnized CPUID flags
Get qemu recognized CPUID flags
:param qemu_binary: qemu-kvm binary file path
:return: flags list
Expand Down Expand Up @@ -1034,7 +1034,7 @@ def get_model_features(model_name):
logging.warn("No attribute %s in file %s" % (str(elem_attr), conf))
raise
except Exception:
# Other excptions like IOError when open/read configuration file,
# Other exceptions like IOError when open/read configuration file,
# capture here
logging.warn("Some other exceptions, like configuration file is not "
"found or not file: %s" % conf)
Expand Down Expand Up @@ -1104,7 +1104,7 @@ def cpu_allowed_list_by_task(pid, tid):

def hotplug_domain_vcpu(vm, count, by_virsh=True, hotplug=True):
"""
Hot-plug/Hot-unplug vcpu for domian
Hot-plug/Hot-unplug vcpu for domain
:param vm: VM object
:param count: to setvcpus it's the current vcpus number,
Expand Down
2 changes: 1 addition & 1 deletion virttest/element_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ def __init__(self, element_factory=None):
self._factory = element_factory

#
# Flushes the parser buffers, and returns the toplevel documen
# Flushes the parser buffers, and returns the toplevel document
# element.
#
# :return: An Element instance.
Expand Down
6 changes: 3 additions & 3 deletions virttest/gluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def glusterd_start():
# The blank before 'active' makes a distinction with 'inactive'
if ' active' not in output or 'running' not in output:
cmd = "service glusterd start"
error_context.context("Starting gluster dameon failed")
error_context.context("Starting gluster daemon failed")
output = process.run(cmd).stdout_text


Expand Down Expand Up @@ -304,7 +304,7 @@ def create_gluster_vol(params):
break
hostname = ip_addr

# Start the gluster dameon, if not started
# Start the gluster daemon, if not started
glusterd_start()
# Check for the volume is already present, if not create one.
if not is_gluster_vol_avail(vol_name) or force:
Expand Down Expand Up @@ -334,7 +334,7 @@ def create_gluster_uri(params, stripped=False):
if not gluster_server or gluster_server == "(none)":
gluster_server = utils_net.get_host_ip_address(params)

# Start the gluster dameon, if not started
# Start the gluster daemon, if not started
# Building gluster uri
gluster_uri = None
if stripped:
Expand Down
4 changes: 2 additions & 2 deletions virttest/graphical_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def _get_seq(seq_str, interval):
:param seq_str: key str, if have '-', seprate them by '-' sign,
and return them separately. if have not '-',
return orginal str.
return original str.
:param interval: the interval between return two value.
"""
seq_str += _STR_DASH
Expand All @@ -286,7 +286,7 @@ def _key_convert(self, key):
Key Convert.
The method convert key name that defined in KEY_MAP_FILE.
file to correct console excuteble code.
file to correct console executable code.
:param key: key name.
"""
Expand Down
10 changes: 5 additions & 5 deletions virttest/guest_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def _get_supported_cmds(self):

def check_has_command(self, cmd):
"""
Check wheter guest agent support 'cmd'.
Check whether guest agent support 'cmd'.
:param cmd: command string which will be checked.
Expand All @@ -351,7 +351,7 @@ def check_has_command(self, cmd):

def _log_command(self, cmd, debug=True, extra_str=""):
"""
Print log message beening sent.
Print log message being sent.
:param cmd: Command string.
:param debug: Whether to print the commands.
Expand Down Expand Up @@ -395,7 +395,7 @@ def _dump_dict(di, indent=0):

if self.debug_log or debug:
logging.debug("(vagent %s) Response to '%s' "
"(re-formated)", self.name, cmd)
"(re-formatted)", self.name, cmd)
if isinstance(resp, dict):
_dump_dict(resp)
elif isinstance(resp, list):
Expand Down Expand Up @@ -504,7 +504,7 @@ def shutdown(self, mode=SHUTDOWN_MODE_POWERDOWN):
"""
Send "guest-shutdown", this cmd would not return any response.
:param mode: Speicfy shutdown mode, now qemu guest agent supports
:param mode: Specify shutdown mode, now qemu guest agent supports
'powerdown', 'reboot', 'halt' 3 modes.
:return: True if shutdown cmd is sent successfully, False if
'shutdown' is unsupported.
Expand Down Expand Up @@ -551,7 +551,7 @@ def set_user_password(self, password, crypted=False, username="root"):
@error_context.context_aware
def get_vcpus(self):
"""
Get the vcpus infomation
Get the vcpus information
"""
cmd = "guest-get-vcpus"
self.check_has_command(cmd)
Expand Down
4 changes: 2 additions & 2 deletions virttest/iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def export_target(self):
else:
emulated_image_size = os.path.getsize(self.emulated_image) // 1024
if emulated_image_size != self.emulated_expect_size:
# No need to remvoe, rebuild is fine
# No need to remove, rebuild is fine
process.system(self.create_cmd)
cmd = "tgtadm --lld iscsi --mode target --op show"
try:
Expand Down Expand Up @@ -692,7 +692,7 @@ def export_target(self):
else:
emulated_image_size = os.path.getsize(self.emulated_image) // 1024
if emulated_image_size != self.emulated_expect_size:
# No need to remvoe, rebuild is fine
# No need to remove, rebuild is fine
process.system(self.create_cmd)

# confirm if the target exists and create iSCSI target
Expand Down
Loading

0 comments on commit 08df0e6

Please sign in to comment.