* [PATCH v1 0/2] some fixes for genisoimage usage
@ 2020-05-15 17:28 Alex Bennée
2020-05-15 17:28 ` [PATCH v1 1/2] configure: add alternate binary for genisoimage Alex Bennée
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alex Bennée @ 2020-05-15 17:28 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée, robert.foley
Hi Robert,
Here are a couple of patches you might want to add to the start of
your vm build series that deal with the fact genisoimage might not
exist or have a different name.
Alex Bennée (2):
configure: add alternate binary for genisoimage
tests/vm: pass --genisoimage to basevm script
configure | 2 +-
tests/vm/Makefile.include | 1 +
tests/vm/basevm.py | 16 ++++++++++------
3 files changed, 12 insertions(+), 7 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] configure: add alternate binary for genisoimage
2020-05-15 17:28 [PATCH v1 0/2] some fixes for genisoimage usage Alex Bennée
@ 2020-05-15 17:28 ` Alex Bennée
2020-05-15 17:28 ` [PATCH v1 2/2] tests/vm: pass --genisoimage to basevm script Alex Bennée
2020-05-15 17:36 ` [PATCH v1 0/2] some fixes for genisoimage usage Robert Foley
2 siblings, 0 replies; 5+ messages in thread
From: Alex Bennée @ 2020-05-15 17:28 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée, robert.foley
Not all distros ship genisoimage which is a Debian fork from the
original cdrtools. As the options are pretty much the same support it
as a fallback binary.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 26084fc53ad..a574250524f 100755
--- a/configure
+++ b/configure
@@ -941,7 +941,7 @@ done
# Check for ancillary tools used in testing
genisoimage=
-for binary in genisoimage
+for binary in genisoimage mkisofs
do
if has $binary
then
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] tests/vm: pass --genisoimage to basevm script
2020-05-15 17:28 [PATCH v1 0/2] some fixes for genisoimage usage Alex Bennée
2020-05-15 17:28 ` [PATCH v1 1/2] configure: add alternate binary for genisoimage Alex Bennée
@ 2020-05-15 17:28 ` Alex Bennée
2020-05-15 17:32 ` Philippe Mathieu-Daudé
2020-05-15 17:36 ` [PATCH v1 0/2] some fixes for genisoimage usage Robert Foley
2 siblings, 1 reply; 5+ messages in thread
From: Alex Bennée @ 2020-05-15 17:28 UTC (permalink / raw)
To: qemu-devel
Cc: Fam Zheng, Philippe Mathieu-Daudé, Alex Bennée, robert.foley
If we have an alternative to genisoimage we really need to tell the
script about it as well so it can use it. It will still default to
genisoimage in case it is run outside our build machinery.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/vm/Makefile.include | 1 +
tests/vm/basevm.py | 16 ++++++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index 1bf9693d195..74ab522c55d 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -56,6 +56,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \
$(call quiet-command, \
$(PYTHON) $< \
$(if $(V)$(DEBUG), --debug) \
+ $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \
--image "$@" \
--force \
--build-image $@, \
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 756ccf7acae..a2d4054d72b 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -61,8 +61,9 @@ class BaseVM(object):
# 4 is arbitrary, but greater than 2,
# since we found we need to wait more than twice as long.
tcg_ssh_timeout_multiplier = 4
- def __init__(self, debug=False, vcpus=None):
+ def __init__(self, debug=False, vcpus=None, genisoimage=None):
self._guest = None
+ self._genisoimage = genisoimage
self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-",
suffix=".tmp",
dir="."))
@@ -381,12 +382,12 @@ class BaseVM(object):
udata.writelines(["apt:\n",
" proxy: %s" % proxy])
udata.close()
- subprocess.check_call(["genisoimage", "-output", "cloud-init.iso",
+ subprocess.check_call([self._genisoimage, "-output", "cloud-init.iso",
"-volid", "cidata", "-joliet", "-rock",
"user-data", "meta-data"],
- cwd=cidir,
- stdin=self._devnull, stdout=self._stdout,
- stderr=self._stdout)
+ cwd=cidir,
+ stdin=self._devnull, stdout=self._stdout,
+ stderr=self._stdout)
return os.path.join(cidir, "cloud-init.iso")
@@ -424,6 +425,8 @@ def parse_args(vmcls):
help="Interactively run command")
parser.add_option("--snapshot", "-s", action="store_true",
help="run tests with a snapshot")
+ parser.add_option("--genisoimage", default="genisoimage",
+ help="iso imaging tool")
parser.disable_interspersed_args()
return parser.parse_args()
@@ -435,7 +438,8 @@ def main(vmcls):
return 1
logging.basicConfig(level=(logging.DEBUG if args.debug
else logging.WARN))
- vm = vmcls(debug=args.debug, vcpus=args.jobs)
+ vm = vmcls(debug=args.debug, vcpus=args.jobs,
+ genisoimage=args.genisoimage)
if args.build_image:
if os.path.exists(args.image) and not args.force:
sys.stderr.writelines(["Image file exists: %s\n" % args.image,
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] tests/vm: pass --genisoimage to basevm script
2020-05-15 17:28 ` [PATCH v1 2/2] tests/vm: pass --genisoimage to basevm script Alex Bennée
@ 2020-05-15 17:32 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-15 17:32 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: Fam Zheng, robert.foley
On 5/15/20 7:28 PM, Alex Bennée wrote:
> If we have an alternative to genisoimage we really need to tell the
> script about it as well so it can use it. It will still default to
> genisoimage in case it is run outside our build machinery.
Maybe worth mentioning it is a follow-up to commit 39d87c8c0c1.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> tests/vm/Makefile.include | 1 +
> tests/vm/basevm.py | 16 ++++++++++------
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
> index 1bf9693d195..74ab522c55d 100644
> --- a/tests/vm/Makefile.include
> +++ b/tests/vm/Makefile.include
> @@ -56,6 +56,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \
> $(call quiet-command, \
> $(PYTHON) $< \
> $(if $(V)$(DEBUG), --debug) \
> + $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \
> --image "$@" \
> --force \
> --build-image $@, \
> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> index 756ccf7acae..a2d4054d72b 100644
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -61,8 +61,9 @@ class BaseVM(object):
> # 4 is arbitrary, but greater than 2,
> # since we found we need to wait more than twice as long.
> tcg_ssh_timeout_multiplier = 4
> - def __init__(self, debug=False, vcpus=None):
> + def __init__(self, debug=False, vcpus=None, genisoimage=None):
> self._guest = None
> + self._genisoimage = genisoimage
> self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-",
> suffix=".tmp",
> dir="."))
> @@ -381,12 +382,12 @@ class BaseVM(object):
> udata.writelines(["apt:\n",
> " proxy: %s" % proxy])
> udata.close()
> - subprocess.check_call(["genisoimage", "-output", "cloud-init.iso",
> + subprocess.check_call([self._genisoimage, "-output", "cloud-init.iso",
> "-volid", "cidata", "-joliet", "-rock",
> "user-data", "meta-data"],
> - cwd=cidir,
> - stdin=self._devnull, stdout=self._stdout,
> - stderr=self._stdout)
> + cwd=cidir,
> + stdin=self._devnull, stdout=self._stdout,
> + stderr=self._stdout)
>
> return os.path.join(cidir, "cloud-init.iso")
>
> @@ -424,6 +425,8 @@ def parse_args(vmcls):
> help="Interactively run command")
> parser.add_option("--snapshot", "-s", action="store_true",
> help="run tests with a snapshot")
> + parser.add_option("--genisoimage", default="genisoimage",
> + help="iso imaging tool")
> parser.disable_interspersed_args()
> return parser.parse_args()
>
> @@ -435,7 +438,8 @@ def main(vmcls):
> return 1
> logging.basicConfig(level=(logging.DEBUG if args.debug
> else logging.WARN))
> - vm = vmcls(debug=args.debug, vcpus=args.jobs)
> + vm = vmcls(debug=args.debug, vcpus=args.jobs,
> + genisoimage=args.genisoimage)
> if args.build_image:
> if os.path.exists(args.image) and not args.force:
> sys.stderr.writelines(["Image file exists: %s\n" % args.image,
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 0/2] some fixes for genisoimage usage
2020-05-15 17:28 [PATCH v1 0/2] some fixes for genisoimage usage Alex Bennée
2020-05-15 17:28 ` [PATCH v1 1/2] configure: add alternate binary for genisoimage Alex Bennée
2020-05-15 17:28 ` [PATCH v1 2/2] tests/vm: pass --genisoimage to basevm script Alex Bennée
@ 2020-05-15 17:36 ` Robert Foley
2 siblings, 0 replies; 5+ messages in thread
From: Robert Foley @ 2020-05-15 17:36 UTC (permalink / raw)
To: Alex Bennée; +Cc: QEMU Developers
On Fri, 15 May 2020 at 13:28, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Hi Robert,
>
> Here are a couple of patches you might want to add to the start of
> your vm build series that deal with the fact genisoimage might not
> exist or have a different name.
Hi Alex,
Sounds good. I will add them to the start of the series.
Thanks & Regards,
-Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-15 17:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 17:28 [PATCH v1 0/2] some fixes for genisoimage usage Alex Bennée
2020-05-15 17:28 ` [PATCH v1 1/2] configure: add alternate binary for genisoimage Alex Bennée
2020-05-15 17:28 ` [PATCH v1 2/2] tests/vm: pass --genisoimage to basevm script Alex Bennée
2020-05-15 17:32 ` Philippe Mathieu-Daudé
2020-05-15 17:36 ` [PATCH v1 0/2] some fixes for genisoimage usage Robert Foley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.