From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, bin.meng@windriver.com
Cc: qemu-trivial@nongnu.org, Juan Quintela <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: [PATCH] tests/qtest/migration-test: Do not try to print NULL pointer string
Date: Mon, 17 Oct 2022 12:55:06 +0200 [thread overview]
Message-ID: <20221017105506.69149-1-thuth@redhat.com> (raw)
If tmpfs is NULL, we should not try to print it as a string.
Reported-by: shengjiangwuqq on github.com
Fixes: e5553c1b8d ("tests/qtest: migration-test: Avoid using hardcoded /tmp")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/migration-test.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index ef4427ff4d..de70611f50 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -2481,8 +2481,7 @@ int main(int argc, char **argv)
tmpfs = g_dir_make_tmp("migration-test-XXXXXX", &err);
if (!tmpfs) {
- g_test_message("g_dir_make_tmp on path (%s): %s", tmpfs,
- err->message);
+ g_test_message("g_dir_make_tmp failed: %s", err->message);
}
g_assert(tmpfs);
--
2.31.1
next reply other threads:[~2022-10-17 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 10:55 Thomas Huth [this message]
2022-10-17 11:43 ` [PATCH] tests/qtest/migration-test: Do not try to print NULL pointer string Markus Armbruster
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=20221017105506.69149-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=bin.meng@windriver.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=quintela@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).