Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virsh_nodecpustats: test_disable_enable_cpu() check if cpu online #5970

Merged

Conversation

rh-jugraham
Copy link
Contributor

@rh-jugraham rh-jugraham commented Oct 29, 2024

Issue:
Failed to online host cpu 79

Note: cpu num variable varies depending on the test

Fix:
The cpu.py function online() returns True if the cpu is online and False if the cpu is offline (in other words, true/false is not tied to if the action performed successfully). This is also the case for def offline(cpu). Therefore, in the case when checking if the cpu is successfully turned online, the test should fail if online() returns False.

Test Passing:

(.libvirt-ci-venv-ci-runtest-1BjoYw) [root@ampere-one-01 ~]# avocado run --vt-type libvirt --vt-omit-data-loss --vt-machine-type arm64-mmio virsh.nodecpustats.disable_enable_cpu --vt-connect-uri qemu:///system
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
JOB ID     : 045ddabb4514f318bf6449d27c7a4d78d20cb357
JOB LOG    : /var/log/avocado/job-results/job-2024-10-29T17.41-045ddab/job.log
 (1/1) type_specific.io-github-autotest-libvirt.virsh.nodecpustats.disable_enable_cpu: STARTED
 (1/1) type_specific.io-github-autotest-libvirt.virsh.nodecpustats.disable_enable_cpu: PASS (6.98 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2024-10-29T17.41-045ddab/results.html
JOB TIME   : 8.38 s

@rh-jugraham rh-jugraham marked this pull request as ready for review October 29, 2024 21:46
Copy link
Contributor

@dzhengfy dzhengfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dzhengfy dzhengfy merged commit dde0b30 into autotest:master Nov 1, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants