Skip to content

Commit

Permalink
fixed spelling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rh-jugraham committed Sep 26, 2024
1 parent dffdfe2 commit 6adb9da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libvirt/tests/src/cpu/vcpu_max_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def run(test, params, env):
2. Start configured vm with guest agent
3. Check that the vm setup is consistent with the topology configured
3a. Check the lscpu output
3b. Check the kernel file for coreid for each vcpu
3b. Check the kernel file for core id for each vcpu
3c. Check the vcpu cluster number
3d. Check the cluster cpu list
"""
Expand Down Expand Up @@ -49,7 +49,7 @@ def run(test, params, env):

# many_clusters case
if clusters_param == "many":
# Ensure that vcpus_num is evenly divisble by the number of clusters
# Ensure that vcpus_num is evenly divisible by the number of clusters
clusters_list = [clusters for clusters in [2, 4, 6] if vcpus_num % clusters == 0]
cores_list = [vcpus_num // clusters for clusters in clusters_list]
# default_clusters case
Expand All @@ -62,7 +62,7 @@ def run(test, params, env):
cores_list = [1]

# many_cores_per_socket
# Ensure that vcpus_num is evenly divible by the number of cores
# Ensure that vcpus_num is evenly divisible by the number of cores
else:
# many_clusters case
# sockets = vcpus_num // number of cores // number of clusters
Expand Down Expand Up @@ -175,19 +175,19 @@ def set_and_check_topology(test, params, env, vcpus_num, sockets, cores, cluster

session = vm.wait_for_login()

# Check kernel file for coreid for each vcpu in the vm
# Check kernel file for core id for each vcpu in the vm

for vcpu in range(vcpus_num):
cmd_coreid = f'cat /sys/devices/system/cpu/cpu{vcpu}/topology/core_id'
ret_coreid = session.cmd_output(cmd_coreid).strip()
if (str(vcpu) != ret_coreid):
test.fail("In the vm kernel file, the coreid for vcpu %s should not be %s" % (vcpu, ret_coreid))
test.fail("In the vm kernel file, the core id for vcpu %s should not be %s" % (vcpu, ret_coreid))

# Check vcpu cluster number

cmd_clusterid = 'cat /sys/devices/system/cpu/cpu*/topology/cluster_id | sort | uniq -c | wc -l'
ret_clusterid = session.cmd_output(cmd_clusterid).strip()
# The result should be equal to defined clusters's value
# The result should be equal to defined clusters' value
if (str(sockets * clusters) != ret_clusterid):
test.fail("In the vm kernel file, the vcpu cluster number should be %s, not %s" % (str(sockets * clusters), ret_clusterid))

Expand Down

0 comments on commit 6adb9da

Please sign in to comment.