Skip to content

Commit 7f22565

Browse files
committed
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 2680dcf commit 7f22565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kvm/dirty_log_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ static void run_test(enum vm_guest_mode mode, void *arg)
695695

696696
pthread_create(&vcpu_thread, NULL, vcpu_worker, vcpu);
697697

698-
for (iteration = 1; iteration < p->iterations; iteration++) {
698+
for (iteration = 1; iteration <= p->iterations; iteration++) {
699699
unsigned long i;
700700

701701
sync_global_to_guest(vm, iteration);

0 commit comments

Comments
 (0)