qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead


From: Thomas Huth
Subject: Re: [PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead of g_test_rand_int()
Date: Wed, 22 Dec 2021 08:02:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 21/12/2021 20.32, Richard Henderson wrote:
On 12/21/21 2:32 AM, Thomas Huth wrote:
Using g_file_open_tmp is certainly better ... but the tests are currently written in a way where they require the file name of the temporary file - so switching to g_file_open_tmp() (which only provides a file handle) certainly would need some rewrite here...

Incorrect.  g_file_open_tmp returns the open file handle, but also returns the filename in *name_used.

D'oh - not sure how I missed that yesterday :-/

I should think you can close the file handle straight away and use the filename.

Ok, then let's continue with that approach.

 Thomas




reply via email to

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