]> Gentwo Git Trees - linux/.git/commit
KVM: selftests: Add wrappers for mmap() and munmap() to assert success
authorSean Christopherson <seanjc@google.com>
Fri, 3 Oct 2025 23:26:02 +0000 (16:26 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 10 Oct 2025 21:25:28 +0000 (14:25 -0700)
commit61cee97f40180312dcca9580a5be0b0aa2217f6e
tree84c4e572c215296e57859e547b1509ac1e365b30
parentdf0d9923f7055169cb01b050236e5a9a2b36db02
KVM: selftests: Add wrappers for mmap() and munmap() to assert success

Add and use wrappers for mmap() and munmap() that assert success to reduce
a significant amount of boilerplate code, to ensure all tests assert on
failure, and to provide consistent error messages on failure.

No functional change intended.

Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Ackerley Tng <ackerleytng@google.com>
Link: https://lore.kernel.org/r/20251003232606.4070510-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/guest_memfd_test.c
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/mmu_stress_test.c
tools/testing/selftests/kvm/s390/ucontrol_test.c
tools/testing/selftests/kvm/set_memory_region_test.c