Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> This patch will add the malloc failure checking
…

* Please use a corresponding imperative wording for the change description.

* Would you like to add the tag “Fixes” accordingly?


…
> +++ b/tools/testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c
> @@ -91,6 +91,7 @@ void test_vmx_nested_state(struct kvm_vcpu *vcpu)
>  	const int state_sz = sizeof(struct kvm_nested_state) + getpagesize();
>  	struct kvm_nested_state *state =
>  		(struct kvm_nested_state *)malloc(state_sz);
> +	TEST_ASSERT(state, "-ENOMEM when allocating kvm state");
…

Can “errno” be relevant for the error message construction?

Regards,
Markus





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux