[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 02/10] qtest/ahci: add qcow2 support to ahci-test
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PULL 02/10] qtest/ahci: add qcow2 support to ahci-test |
Date: |
Thu, 12 Nov 2015 12:05:00 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/12/2015 05:59 AM, Peter Maydell wrote:
> On 29 April 2015 at 00:25, John Snow <address@hidden> wrote:
>> This will enable the testing of high offsets without
>> wasting a lot of disk space, and does not impact the
>> previous tests.
>>
>> mkimg and mkqcow2 are added to libqos for other tests.
>
>
>> + qemu_img_path = getenv("QTEST_QEMU_IMG");
>> + abs_path = realpath(qemu_img_path, NULL);
>> + assert(qemu_img_path);
>> +
>> + cli = g_strdup_printf("%s create -f %s %s %uM", abs_path,
>> + fmt, file, size_mb);
>> + ret = g_spawn_command_line_sync(cli, &out, &out2, &rc, &err);
>> + if (err) {
>> + fprintf(stderr, "%s\n", err->message);
>> + g_error_free(err);
>> + }
>> + g_assert(ret && !err);
>
> I've just discovered that this change means that "make check"
> will fail on a system which doesn't have an installed qemu-img
> and where the build was configured with --disable-tools, and
> with a confusing error message:
>
> Failed to execute child process "(null)" (No such file or directory)
> **
> ERROR:/Users/pm215/src/qemu/tests/libqos/libqos.c:171:void mkimg(const
> char *, const char *, unsigned int): assertion failed: (ret && !err)
>
> The test should probably be skipped if qemu-img isn't available.
>
> thanks
> -- PMM
>
In part I feel that it's reasonable to expect that you have tools
available in order to run tests, but I don't want to be the first to
break rank.
(At the very least, the error is extremely confusing.)
I'm writing a patch now to skip the LBA48 high-sector tests if qemu-img
isn't available and fall back to raw.
--js