Add a super paranoid sanity check in the private mem conversion test to verify that the initial "default" pattern was actually written. The check doesn't add meaningful test coverage, the goal is mostly to aid in debug if something goes sideways, e.g. to give the user confidence that the writes didn't somehow get dropped entirely. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- .../testing/selftests/kvm/x86_64/private_mem_conversions_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kvm/x86_64/private_mem_conversions_test.c b/tools/testing/selftests/kvm/x86_64/private_mem_conversions_test.c index 8a2f924fd031..91f343609e18 100644 --- a/tools/testing/selftests/kvm/x86_64/private_mem_conversions_test.c +++ b/tools/testing/selftests/kvm/x86_64/private_mem_conversions_test.c @@ -129,6 +129,7 @@ static void guest_test_explicit_conversion(uint64_t base_gpa, bool do_fallocate) /* Memory should be shared by default. */ memset((void *)base_gpa, def_p, PER_CPU_DATA_SIZE); + memcmp_g(base_gpa, def_p, PER_CPU_DATA_SIZE); guest_sync_shared(base_gpa, PER_CPU_DATA_SIZE, def_p, init_p); memcmp_g(base_gpa, init_p, PER_CPU_DATA_SIZE); -- 2.42.0.758.gaed0368e0e-goog