From: Sean Christopherson Date: Sat, 11 Jan 2025 00:30:03 +0000 (-0800) Subject: KVM: selftests: Fix an off-by-one in the number of dirty_log_test iterations X-Git-Tag: v6.15-rc1~195^2~8^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f225650e0991c7b9fdfc1524e0381ba61039730;p=thirdparty%2Flinux.git KVM: selftests: Fix an off-by-one in the number of dirty_log_test iterations Actually run all requested iterations, instead of iterations-1 (the count starts at '1' due to the need to avoid '0' as an in-memory value for a dirty page). Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20250111003004.1235645-20-seanjc@google.com Signed-off-by: Sean Christopherson --- diff --git a/tools/testing/selftests/kvm/dirty_log_test.c b/tools/testing/selftests/kvm/dirty_log_test.c index 40567257ebea3..79a7ee189f283 100644 --- a/tools/testing/selftests/kvm/dirty_log_test.c +++ b/tools/testing/selftests/kvm/dirty_log_test.c @@ -695,7 +695,7 @@ static void run_test(enum vm_guest_mode mode, void *arg) pthread_create(&vcpu_thread, NULL, vcpu_worker, vcpu); - for (iteration = 1; iteration < p->iterations; iteration++) { + for (iteration = 1; iteration <= p->iterations; iteration++) { unsigned long i; sync_global_to_guest(vm, iteration);