mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
KVM: selftests: Use TEST_ASSERT_EQ() in test_vmx_nested_state()
The assert messages do not add much value, so use TEST_ASSERT_EQ(), which also nicely displays the addresses in hex. While at it, also assert the values of state->flags. Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev> Link: https://patch.msgid.link/20251121204803.991707-4-yosry.ahmed@linux.dev Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
6f4d3ebc24
commit
bda6ae6f29
|
|
@ -241,8 +241,10 @@ void test_vmx_nested_state(struct kvm_vcpu *vcpu)
|
|||
TEST_ASSERT(state->size >= sizeof(*state) && state->size <= state_sz,
|
||||
"Size must be between %ld and %d. The size returned was %d.",
|
||||
sizeof(*state), state_sz, state->size);
|
||||
TEST_ASSERT(state->hdr.vmx.vmxon_pa == -1ull, "vmxon_pa must be -1ull.");
|
||||
TEST_ASSERT(state->hdr.vmx.vmcs12_pa == -1ull, "vmcs_pa must be -1ull.");
|
||||
|
||||
TEST_ASSERT_EQ(state->hdr.vmx.vmxon_pa, -1ull);
|
||||
TEST_ASSERT_EQ(state->hdr.vmx.vmcs12_pa, -1ull);
|
||||
TEST_ASSERT_EQ(state->flags, 0);
|
||||
|
||||
free(state);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user