lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c814d608-538d-1d1e-c3f2-92d53624cc06@oracle.com>
Date:   Wed, 13 Nov 2019 16:39:47 -0800
From:   Krish Sadhukhan <krish.sadhukhan@...cle.com>
To:     Wainer dos Santos Moschetta <wainersm@...hat.com>,
        pbonzini@...hat.com, rkrcmar@...hat.com
Cc:     shuah@...nel.org, kvm@...r.kernel.org,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests: kvm: Simplify loop in kvm_create_max_vcpus
 test


On 11/12/19 6:21 AM, Wainer dos Santos Moschetta wrote:
> On kvm_create_max_vcpus test remove unneeded local
> variable in the loop that add vcpus to the VM.
>
> Signed-off-by: Wainer dos Santos Moschetta<wainersm@...hat.com>
> ---
>   tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/kvm_create_max_vcpus.c b/tools/testing/selftests/kvm/kvm_create_max_vcpus.c
> index 231d79e57774..6f38c3dc0d56 100644
> --- a/tools/testing/selftests/kvm/kvm_create_max_vcpus.c
> +++ b/tools/testing/selftests/kvm/kvm_create_max_vcpus.c
> @@ -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);
>   
> -	for (i = 0; i < num_vcpus; i++) {
> -		int vcpu_id = first_vcpu_id + i;
> -
> +	for (i = first_vcpu_id; i < first_vcpu_id + num_vcpus; i++)
>   		/* This asserts that the vCPU was created. */
> -		vm_vcpu_add(vm, vcpu_id);
> -	}
> +		vm_vcpu_add(vm, i);
>   
>   	kvm_vm_free(vm);
>   }
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@...cle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ