From: Markus Elfring <Markus.Elfring@web.de>
To: Kunwu Chan <chentao@kylinos.cn>,
linux-kselftest@vger.kernel.org, kvm@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Muhammad Usama Anjum <usama.anjum@collabora.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Kunwu Chan <kunwu.chan@hotmail.com>
Subject: Re: [PATCH] KVM: selftests: Add 'malloc' failure check in config_name
Date: Tue, 23 Apr 2024 13:10:57 +0200 [thread overview]
Message-ID: <5750611d-4c41-449a-ab37-9b234360929d@web.de> (raw)
In-Reply-To: <20240423073721.2001016-1-chentao@kylinos.cn>
…
> 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
prev parent reply other threads:[~2024-04-23 11:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 7:37 Kunwu Chan
2024-04-23 8:50 ` Muhammad Usama Anjum
2024-04-23 11:10 ` Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5750611d-4c41-449a-ab37-9b234360929d@web.de \
--to=markus.elfring@web.de \
--cc=chentao@kylinos.cn \
--cc=kernel-janitors@vger.kernel.org \
--cc=kunwu.chan@hotmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
--cc=usama.anjum@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®