qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] tests/9pfs: fix test dir for parallel tests


From: Thomas Huth
Subject: Re: [PATCH 1/2] tests/9pfs: fix test dir for parallel tests
Date: Mon, 9 Nov 2020 12:51:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]