qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Greg Kurz <groug@kaod.org>,
	Christian Schoenebeck <qemu_oss@crudebyte.com>
Cc: Laurent Vivier <lvivier@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] tests/9pfs: fix test dir for parallel tests
Date: Mon, 9 Nov 2020 12:51:16 +0100	[thread overview]
Message-ID: <aff54ce4-58d3-da85-b466-0332aa601384@redhat.com> (raw)
In-Reply-To: <20201030123214.50806454@bahia.lan>

On 30/10/2020 12.32, Greg Kurz wrote:
> On Fri, 30 Oct 2020 09:19:46 +0100
> Christian Schoenebeck <qemu_oss@crudebyte.com> wrote:
[...]
>> diff --git a/tests/qtest/libqos/virtio-9p.c b/tests/qtest/libqos/virtio-9p.c
>> index d43647b3b7..6b22fa0e9a 100644
>> --- a/tests/qtest/libqos/virtio-9p.c
>> +++ b/tests/qtest/libqos/virtio-9p.c
>> @@ -35,7 +35,12 @@ static char *concat_path(const char* a, const char* b)
>>  static void init_local_test_path(void)
>>  {
>>      char *pwd = g_get_current_dir();
>> -    local_test_path = concat_path(pwd, "qtest-9p-local");
>> +    char *template = concat_path(pwd, "qtest-9p-local-XXXXXX");
>> +    local_test_path = mkdtemp(template);
>> +    if (!local_test_path) {
>> +        g_test_message("mkdtemp('%s') failed: %s", template, strerror(errno));
> 
> Just per curiosity, is there a preferred way to output error messages ?

I don't think that we've ever agreed on a common way here... but as far as I
can see, most tests rather use fprintf(stderr, ...) for error messages,
while g_test_message() is rather for normal log messages?

 Thomas



      reply	other threads:[~2020-11-09 11:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  8:26 [PATCH 0/2] 9pfs: test suite fixes Christian Schoenebeck
2020-10-30  8:19 ` [PATCH 2/2] tests/9pfs: fix coverity error in create_local_test_dir() Christian Schoenebeck
2020-10-30 11:44   ` Greg Kurz
2020-10-30 11:59     ` Christian Schoenebeck
2020-10-30 12:09       ` Peter Maydell
2020-10-30 13:04         ` Christian Schoenebeck
2020-10-30 12:32       ` Greg Kurz
2020-10-30  8:19 ` [PATCH 1/2] tests/9pfs: fix test dir for parallel tests Christian Schoenebeck
2020-10-30 11:32   ` Greg Kurz
2020-11-09 11:51     ` Thomas Huth [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=aff54ce4-58d3-da85-b466-0332aa601384@redhat.com \
    --to=thuth@redhat.com \
    --cc=groug@kaod.org \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.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).