From: Laurent Vivier <laurent@vivier.eu>
To: Bin Meng <bmeng.cn@gmail.com>,
qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
Bin Meng <bin.meng@windriver.com>,
Shengjiang Wu <shengjiang.wu@windriver.com>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH v2 2/2] tests/qtest: vhost-user-test: Fix [-Werror=format-overflow=] build warning
Date: Sat, 22 Oct 2022 23:17:37 +0200 [thread overview]
Message-ID: <1de34fa6-dbe8-d3e6-b097-a44d09dc32e7@vivier.eu> (raw)
In-Reply-To: <20221017132023.2228641-2-bmeng.cn@gmail.com>
Le 17/10/2022 à 15:20, Bin Meng a écrit :
> From: Bin Meng <bin.meng@windriver.com>
>
> When tmpfs is NULL, a build warning is seen with GCC 9.3.0.
> It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this,
> neither did the QEMU CI.
>
> While we are here, improve the error message as well.
>
> Reported-by: Shengjiang Wu <shengjiang.wu@windriver.com>
> Fixes: e6efe236c1d1 ("tests/qtest: vhost-user-test: Avoid using hardcoded /tmp")
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> ---
>
> Changes in v2:
> - improve the error message
>
> tests/qtest/vhost-user-test.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
> index e8d2da7228..bf9f7c4248 100644
> --- a/tests/qtest/vhost-user-test.c
> +++ b/tests/qtest/vhost-user-test.c
> @@ -571,8 +571,8 @@ static TestServer *test_server_new(const gchar *name,
>
> tmpfs = g_dir_make_tmp("vhost-test-XXXXXX", &err);
> if (!tmpfs) {
> - g_test_message("g_dir_make_tmp on path (%s): %s", tmpfs,
> - err->message);
> + g_test_message("Can't create temporary directory in %s: %s",
> + g_get_tmp_dir(), err->message);
> g_error_free(err);
> }
> g_assert(tmpfs);
Applied to my trivial-patches branch.
Thanks,
Laurent
next prev parent reply other threads:[~2022-10-24 4:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 13:20 [PATCH v2 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning Bin Meng
2022-10-17 13:20 ` [PATCH v2 2/2] tests/qtest: vhost-user-test: " Bin Meng
2022-10-22 21:17 ` Laurent Vivier [this message]
2022-10-22 21:17 ` [PATCH v2 1/2] tests/qtest: migration-test: " Laurent Vivier
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=1de34fa6-dbe8-d3e6-b097-a44d09dc32e7@vivier.eu \
--to=laurent@vivier.eu \
--cc=armbru@redhat.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=shengjiang.wu@windriver.com \
--cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).