lkml.org 
[lkml]   [2024]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] KVM: selftests: Add 'malloc' failure check in config_name
From

> 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/get-reg-list.c
> @@ -66,6 +66,7 @@ static const char *config_name(struct vcpu_reg_list *c)
> len += strlen(s->name) + 1;
>
> c->name = malloc(len);
> + TEST_ASSERT(c->name, "-ENOMEM when allocating config name");


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

Regards,
Markus

\
 
 \ /
  Last update: 2024-05-27 17:58    [W:0.040 / U:1.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site