qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 20/51] tests/qtest: i440fx-test: Skip running request_{bios,


From: Bin Meng
Subject: Re: [PATCH 20/51] tests/qtest: i440fx-test: Skip running request_{bios, pflash} for win32
Date: Fri, 2 Sep 2022 16:29:10 +0800

On Wed, Aug 31, 2022 at 9:40 PM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Wed, Aug 24, 2022 at 2:15 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> From: Bin Meng <bin.meng@windriver.com>
>>
>> The request_{bios,pflash} test cases call mmap() which does not
>> exist on win32. Exclude them.
>>
>
> We can fairly easily rewrite the create_blob_file() function to be portable 
> though, something like:

Thanks for the suggestion!

Will spin a patch in v2.

>
> static char *create_blob_file(void)
> {
>     g_autofree uint8_t *buf = g_malloc(BLOB_SIZE);
>     GError *error = NULL;
>     char *pathname;
>     int fd;
>     size_t i;
>
>     fd = g_file_open_tmp("blob_XXXXXX", &pathname, &error);
>     g_assert_no_error(error);
>
>     for (i = 0; i < BLOB_SIZE; ++i) {
>         buf[i] = i;
>     }
>
>     g_file_set_contents(pathname, (char *)buf, BLOB_SIZE, &error);
>     g_assert_no_error(error);
>     close(fd);
>
>     return pathname;
> }
>
>> Signed-off-by: Bin Meng <bin.meng@windriver.com>
>> ---
>>
>>  tests/qtest/i440fx-test.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>

Regards,
Bin



reply via email to

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