avocado-framework / avocado-vt

Avocado VT Plugin
https://avocado-vt.readthedocs.org/
Other
84 stars 243 forks source link

vm_xml: set_vm_vcpus() ensure clusters not None #4021

Closed rh-jugraham closed 6 days ago

rh-jugraham commented 2 weeks ago

Signed-off-by: Julia Graham jugraham@redhat.com

Modified set_vm_vcpus() to ensure clusters is not None

Yingshun commented 2 weeks ago

@nanli1 Could you plz help review this PR? Thanks!

nanli1 commented 2 weeks ago

hi , Any results for this update?

rh-jugraham commented 2 weeks ago

hi , Any results for this update?

Test results for the case that is fixed by this change:

(.libvirt-ci-venv-ci-runtest-1BjoYw) [root@ampere-one-01 ~]# avocado run --vt-type libvirt --vt-omit-data-loss --vt-machine-type arm64-mmio vcpu_misc --vt-connect-uri qemu:///system
JOB ID     : f9192051b4af4710fc33c5fa8c00df8e35aee0ef
JOB LOG    : /var/log/avocado/job-results/job-2024-10-30T11.59-f919205/job.log
 (1/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.snapshot: STARTED
 (1/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.snapshot: PASS (83.79 s)
 (2/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.with_topology.vcpus_max_equal_topology: STARTED
 (2/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.with_topology.vcpus_max_equal_topology: PASS (9.45 s)
 (3/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.mode_max: STARTED
 (3/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.mode_max: PASS (30.51 s)
 (4/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.managedsave_restore: STARTED
 (4/6) type_specific.io-github-autotest-libvirt.vcpu_misc.positive_test.managedsave_restore: PASS (10.94 s)
 (5/6) type_specific.io-github-autotest-libvirt.vcpu_misc.negative_test.with_topology.vcpus_max_exceed_topology: STARTED
 (5/6) type_specific.io-github-autotest-libvirt.vcpu_misc.negative_test.with_topology.vcpus_max_exceed_topology: PASS (26.83 s)
 (6/6) type_specific.io-github-autotest-libvirt.vcpu_misc.negative_test.with_topology.vcpus_max_less_than_topology: STARTED
 (6/6) type_specific.io-github-autotest-libvirt.vcpu_misc.negative_test.with_topology.vcpus_max_less_than_topology: PASS (27.08 s)
RESULTS    : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2024-10-30T11.59-f919205/results.html
JOB TIME   : 192.85 s

Test results for some other cases that use this function:

(.libvirt-ci-venv-ci-runtest-1BjoYw) [root@ampere-one-01 ~]# avocado run --vt-type libvirt --vt-omit-data-loss --vt-machine-type arm64-mmio vcpu.max_topology virsh.guestvcpus.normal_test -
-vt-connect-uri qemu:///system
JOB ID     : 687ee83c543ac7f748df37dca76f2b5f462a9f05
JOB LOG    : /var/log/avocado/job-results/job-2024-10-30T12.28-687ee83/job.log
 (1/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.one_socket.default_clusters: STARTED
 (1/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.one_socket.default_clusters: PASS (85.70 s)
 (2/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.one_socket.many_clusters: STARTED
 (2/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.one_socket.many_clusters: PASS (188.18 s)
 (3/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.one_core_per_socket: STARTED
 (3/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.one_core_per_socket: PASS (86.81 s)
 (4/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.many_cores_per_socket.default_clusters: STARTED
 (4/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.many_cores_per_socket.default_clusters: PASS (188.87 s)
 (5/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.many_cores_per_socket.many_clusters: STARTED
 (5/9) type_specific.io-github-autotest-libvirt.vcpu.max_topology.many_cores_per_socket.many_clusters: PASS (137.75 s)
 (6/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.no-option: STARTED
 (6/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.no-option: PASS (64.93 s)
 (7/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.disable: STARTED
 (7/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.disable: PASS (65.78 s)
 (8/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.enable: STARTED
 (8/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.enable: PASS (64.55 s)
 (9/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.combine: STARTED
 (9/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.combine: PASS (67.18 s)
RESULTS    : PASS 9 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2024-10-30T12.28-687ee83/results.html
JOB TIME   : 955.93 s
nanli1 commented 1 week ago

@rh-jugrahamHi, Could you convert this pr to draft, I would like to run on x86 to check the results.

rh-jugraham commented 1 week ago

@rh-jugrahamHi, Could you convert this pr to draft, I would like to run on x86 to check the results.

Sounds good!

nanli1 commented 1 week ago

@rh-jugraham hi :D, could you check this three failures rhel.vcpu_misc.positive_test.with_topology in x86 , I wonder it's related to this pr , Do this three also fail on arm ?

Yingshun commented 1 week ago

@rh-jugraham hi :D, could you check this three failures rhel.vcpu_misc.positive_test.with_topology in x86 , I wonder it's related to this pr , Do this three also fail on arm ?

@nanli1 is the jenkins build run with this pr? As you can see from the test results provided by julia the test "vcpu_misc.positive_test.with_topology" passed after the fix. I think you can apply this change and check them again if you haven't, thx!

nanli1 commented 1 week ago

@rh-jugraham hi :D, could you check this three failures rhel.vcpu_misc.positive_test.with_topology in x86 , I wonder it's related to this pr , Do this three also fail on arm ?

@nanli1 is the jenkins build run with this pr? As you can see from the test results provided by julia the test "vcpu_misc.positive_test.with_topology" passed after the fix. I think you can apply this change and check them again if you haven't, thx!

oh, my mistake , running again x86

nanli1 commented 6 days ago

Works on jenkins job: **RHEL-9.6-runtest-x86_64-function-cpu/8/

Yingshun commented 6 days ago

Thanks @nanli1

Works on jenkins job: **RHEL-9.6-runtest-x86_64-function-cpu/8/