qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/4] tests/vm: Add a dependency to qemu-img
Date: Wed, 11 Jul 2018 10:16:54 +0800	[thread overview]
Message-ID: <20180711021654.GB1280@lemon.usersys.redhat.com> (raw)
In-Reply-To: <5815c1eb-b5ef-a298-3267-be710e736a38@amsat.org>

On Tue, 07/03 12:56, Philippe Mathieu-Daudé wrote:
> Hi Fam,
> 
> On 07/02/2018 12:19 PM, Philippe Mathieu-Daudé wrote:
> > On 07/02/2018 04:18 AM, Fam Zheng wrote:
> >> On Thu, 06/28 12:35, Philippe Mathieu-Daudé wrote:
> >>> Before the first use, the VM image are resized with qemu-img.
> >>>
> >>> Add a dependency to the qemu-img tool to fix:
> >>>
> >>>   $ make vm-build-ubuntu.i386
> >>>   Traceback (most recent call last):
> >>>     File "source/qemu/tests/vm/basevm.py", line 236, in main
> >>>       return vm.build_image(args.image)
> >>>     File "tests/vm/ubuntu.i386", line 67, in build_image
> >>>       subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"])
> >>>   OSError: [Errno 2] No such file or directory
> >>>   tests/vm/Makefile.include:23: recipe for target 'tests/vm/ubuntu.i386.img' failed
> >>>   make: *** [tests/vm/ubuntu.i386.img] Error 2
> >>>
> >>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >>> ---
> >>>  tests/vm/Makefile.include | 3 +++
> >>>  1 file changed, 3 insertions(+)
> >>>
> >>> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
> >>> index 5daa2a3b73..e5e8146267 100644
> >>> --- a/tests/vm/Makefile.include
> >>> +++ b/tests/vm/Makefile.include
> >>> @@ -17,10 +17,13 @@ vm-test:
> >>>  
> >>>  vm-build-all: $(addprefix vm-build-, $(IMAGES))
> >>>  
> >>> +$(IMAGE_FILES): qemu-img$(EXESUF)
> >>
> >> No, please don't do this. Let's keep on supporting vm tests from a clean source
> >> tree. Similar to qemu_bin, this can be handled in basevm.py.
> > 
> > OK.
> 
> The ubuntu.i386 VM is the only one using the qemu-img tool in his
> build_image() method implementation. Is it OK to add this check there?
> The basevm.build_image() is only an abstract method.

Maybe you can add a BaseVM.qemu_img() method that looks up for available
qemu-img on the system or build dir.

Fam

> 
> >>> +
> >>>  tests/vm/%.img: $(SRC_PATH)/tests/vm/% \
> >>>  		$(SRC_PATH)/tests/vm/basevm.py \
> >>>  		$(SRC_PATH)/tests/vm/Makefile.include
> >>>  	$(call quiet-command, \
> >>> +		PATH=$(PATH):. \
> >>>  		$< \
> >>>  		$(if $(V)$(DEBUG), --debug) \
> >>>  		--image "$@" \
> >>> -- 
> >>> 2.18.0
> >>>
> >>

  reply	other threads:[~2018-07-11  2:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 15:35 [Qemu-devel] [PATCH 0/4] tests/vm: various trivial fixes Philippe Mathieu-Daudé
2018-06-28 15:35 ` [Qemu-devel] [PATCH 1/4] tests/vm: Support proxy / corporate firewall Philippe Mathieu-Daudé
2018-07-02  7:12   ` Fam Zheng
2018-07-02 15:11     ` Philippe Mathieu-Daudé
2018-07-03  1:47       ` Fam Zheng
2018-06-28 15:35 ` [Qemu-devel] [PATCH 2/4] tests/vm: Add a dependency to qemu-img Philippe Mathieu-Daudé
2018-06-28 15:47   ` Philippe Mathieu-Daudé
2018-07-02  7:18   ` Fam Zheng
2018-07-02 15:19     ` Philippe Mathieu-Daudé
2018-07-03 15:56       ` Philippe Mathieu-Daudé
2018-07-11  2:16         ` Fam Zheng [this message]
2018-06-28 15:35 ` [Qemu-devel] [PATCH 3/4] tests/vm: Only use -cpu 'host' if KVM is available Philippe Mathieu-Daudé
2018-06-28 15:35 ` [Qemu-devel] [PATCH 4/4] tests/vm: Add flex and bison to the vm image Philippe Mathieu-Daudé
2018-07-02  7:21 ` [Qemu-devel] [PATCH 0/4] tests/vm: various trivial fixes Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180711021654.GB1280@lemon.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).