From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwvJ3-0007A6-Ec for qemu-devel@nongnu.org; Thu, 12 Nov 2015 12:05:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwvJ0-0001HI-6Y for qemu-devel@nongnu.org; Thu, 12 Nov 2015 12:05:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwvJ0-0001H7-19 for qemu-devel@nongnu.org; Thu, 12 Nov 2015 12:05:02 -0500 References: <1430263537-7786-1-git-send-email-jsnow@redhat.com> <1430263537-7786-3-git-send-email-jsnow@redhat.com> From: John Snow Message-ID: <5644C6BC.9030109@redhat.com> Date: Thu, 12 Nov 2015 12:05:00 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 02/10] qtest/ahci: add qcow2 support to ahci-test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 11/12/2015 05:59 AM, Peter Maydell wrote: > On 29 April 2015 at 00:25, John Snow 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