Commit f245eead authored by Wainer dos Santos Moschetta's avatar Wainer dos Santos Moschetta Committed by Paolo Bonzini

selftests: kvm: Simplify loop in kvm_create_max_vcpus test

On kvm_create_max_vcpus test remove unneeded local
variable in the loop that add vcpus to the VM.
Signed-off-by: default avatarWainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: default avatarKrish Sadhukhan <krish.sadhukhan@oracle.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1924242b
...@@ -29,12 +29,9 @@ void test_vcpu_creation(int first_vcpu_id, int num_vcpus) ...@@ -29,12 +29,9 @@ void test_vcpu_creation(int first_vcpu_id, int num_vcpus)
vm = vm_create(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES, O_RDWR); vm = vm_create(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES, O_RDWR);
for (i = 0; i < num_vcpus; i++) { for (i = first_vcpu_id; i < first_vcpu_id + num_vcpus; i++)
int vcpu_id = first_vcpu_id + i;
/* This asserts that the vCPU was created. */ /* This asserts that the vCPU was created. */
vm_vcpu_add(vm, vcpu_id); vm_vcpu_add(vm, i);
}
kvm_vm_free(vm); kvm_vm_free(vm);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment