KVM: selftests: Factor out guest mode code
authorAndrew Jones <drjones@redhat.com>
Fri, 18 Dec 2020 14:17:32 +0000 (15:17 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Jan 2021 23:07:29 +0000 (18:07 -0500)
commite42ac777d661e878c3b9bac56df11e226cab3010
treef57cdf6cd375982878d4a314b442fe6fc34d6b09
parent52782d5b63725a6c4bf642557c83507430064110
KVM: selftests: Factor out guest mode code

demand_paging_test, dirty_log_test, and dirty_log_perf_test have
redundant guest mode code. Factor it out.

Also, while adding a new include, remove the ones we don't need.

Reviewed-by: Ben Gardon <bgardon@google.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20201218141734.54359-2-drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/demand_paging_test.c
tools/testing/selftests/kvm/dirty_log_perf_test.c
tools/testing/selftests/kvm/dirty_log_test.c
tools/testing/selftests/kvm/include/guest_modes.h [new file with mode: 0644]
tools/testing/selftests/kvm/lib/guest_modes.c [new file with mode: 0644]