From: Markus Armbruster <armbru@redhat.com>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: qemu-devel@nongnu.org, 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 2/2] tests/qtest: vhost-user-test: Fix [-Werror=format-overflow=] build warning
Date: Mon, 17 Oct 2022 14:33:04 +0200 [thread overview]
Message-ID: <87v8oi635r.fsf@pond.sub.org> (raw)
In-Reply-To: <20221017114647.2226535-2-bmeng.cn@gmail.com> (Bin Meng's message of "Mon, 17 Oct 2022 19:46:47 +0800")
Bin Meng <bmeng.cn@gmail.com> writes:
> 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.
>
> 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>
> ---
>
> tests/qtest/vhost-user-test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
> index e8d2da7228..819b87df3c 100644
> --- a/tests/qtest/vhost-user-test.c
> +++ b/tests/qtest/vhost-user-test.c
> @@ -571,7 +571,7 @@ 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,
> + g_test_message("g_dir_make_tmp on path (%s): %s", g_get_tmp_dir(),
> err->message);
> g_error_free(err);
> }
Suggest to improve the error message while there: "can't create
temporary file in %s: %s"
Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2022-10-17 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 11:46 [PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning Bin Meng
2022-10-17 11:46 ` [PATCH 2/2] tests/qtest: vhost-user-test: " Bin Meng
2022-10-17 12:33 ` Markus Armbruster [this message]
2022-10-17 13:57 ` Bin Meng
2022-10-17 12:28 ` [PATCH 1/2] tests/qtest: migration-test: " Markus Armbruster
2022-10-17 12:30 ` Markus Armbruster
2022-10-17 13:56 ` Bin Meng
2022-10-17 14:14 ` Thomas Huth
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=87v8oi635r.fsf@pond.sub.org \
--to=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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.