From nobody Fri Nov 14 19:22:31 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589563867; cv=none; d=zohomail.com; s=zohoarc; b=WT/hjKo/wveWca/q1ByEvNmGNXZqWQ6vCqiwWMgqqL7h/UEs2P1nTHzxRtRAD4i/daf+3g0obfDaAprPY9/mEtf2w9jvJAXQQlHX9Q6vSozbOMR3EWLS5vkgxSCGTFnGIF+baeDEJ5rQdnAEaOxgna8egkpdmf6sf4AxdjhOtpw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589563867; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oAW6sgDCW3rYyrQQOtrgET+T55ELTqidNtOcxJc+4ts=; b=auqNxIHnL+eD8Do2SsEZby8VTgzizTqcBxnKAFpJVRoxGTjh2sVfz9CyS4S9KrW6TAANGNLZB0MlljoOVdZm6siRMbG+EWhsAlyPliwnMG4czbcesmJXncZWSSMuenJSzCkaUs7ZYzCPHpvVnxa67bjiLNdXTHzdTkyJaLymank= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589563867751868.1999480678901; Fri, 15 May 2020 10:31:07 -0700 (PDT) Received: from localhost ([::1]:39464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZeAs-00082z-F9 for importer@patchew.org; Fri, 15 May 2020 13:31:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZe8T-0003da-Hb for qemu-devel@nongnu.org; Fri, 15 May 2020 13:28:37 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:51421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZe8S-00016h-JM for qemu-devel@nongnu.org; Fri, 15 May 2020 13:28:37 -0400 Received: by mail-wm1-x344.google.com with SMTP id f134so3105251wmf.1 for ; Fri, 15 May 2020 10:28:36 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w9sm5372491wrc.27.2020.05.15.10.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2020 10:28:31 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 613731FF8C; Fri, 15 May 2020 18:28:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oAW6sgDCW3rYyrQQOtrgET+T55ELTqidNtOcxJc+4ts=; b=KNaJlWa9a6GnBklC4PpfVmmUjSoXkRASJWRMaupy20+GdkDDtDnC8ybwV9Pn1BsizB APR22yy4FshshFCpV6Tctl/vt1UfA7iDM2Wv0n7m9IvBm0SIvIVdov9gOacb5UKbKEfK jS+Jq5+8HoqPGSjUsvsUaA1cjCj6HTolEgoWBeqjiLkGkEVsCs4VJoq/IJNRT8q25Dzp kn/YD2UF3TEDbsGX34pnrLAw6RBf61oD+3M8jzLqNEYx50pVjFNgl9Mdn+4BtLsEI4qW 5musrPLiu2TXnBcXnXek7LV/SS9Ww/i/wSo+iUO6m+YivLj/OWNfyjxcEJDciUt724K5 Fz5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oAW6sgDCW3rYyrQQOtrgET+T55ELTqidNtOcxJc+4ts=; b=sUJrZz8xOoURhs2dtaO/aEon6NHeLL1rVIBD9s7+/M73UPPk35Zdve9zn9RJwb4PFr L0atcbZ8W7Orkn8d8mg2zTTyuqTo/TvmIwMm4wDe052eQa/gLK71XAss/AH2Qb2A1I8F LkezTBuhkz/E11TIwZiffVVBDRn7NpXyDCUQF6Lzb/MVFzx3xM/mZcDGgseDHxHsIlTj R4VwD6DljcQxD4Wwi3IML4WxJl2HYyyMT5m33t86ZWBlqPaT25d38gssv1xLUzLmdJqk KKXm0UNLtGunWXLVtvIUBi2+LCnPgUhIJPQrvuP8EyWZE4/AbD+eax3T0VwmCCPPRG77 A6mg== X-Gm-Message-State: AOAM532vJbCrmWEc+NwyUQfAALW4n26/zvpAWAA9LJtKlpkI5XXm4EUF UcL3X18hG1hKGtnkuFBuj7oZjQ== X-Google-Smtp-Source: ABdhPJwlwl+yaIIPe6mzsSmv8As/CCF/BtKiwYx/SmQ/9zAwDCjz8vxt2Mdyqy50mwi/k1jQDLHW0g== X-Received: by 2002:a1c:6142:: with SMTP id v63mr4858146wmb.61.1589563715184; Fri, 15 May 2020 10:28:35 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/2] tests/vm: pass --genisoimage to basevm script Date: Fri, 15 May 2020 18:28:31 +0100 Message-Id: <20200515172831.8439-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200515172831.8439-1-alex.bennee@linaro.org> References: <20200515172831.8439-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , robert.foley@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 =3D 4 - def __init__(self, debug=3DFalse, vcpus=3DNone): + def __init__(self, debug=3DFalse, vcpus=3DNone, genisoimage=3DNone): self._guest =3D None + self._genisoimage =3D genisoimage self._tmpdir =3D os.path.realpath(tempfile.mkdtemp(prefix=3D"vm-te= st-", suffix=3D".tmp", dir=3D".")) @@ -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.i= so", "-volid", "cidata", "-joliet", "-rock", "user-data", "meta-data"], - cwd=3Dcidir, - stdin=3Dself._devnull, stdout=3Dself._stdou= t, - stderr=3Dself._stdout) + cwd=3Dcidir, + stdin=3Dself._devnull, stdout=3Dself._stdout, + stderr=3Dself._stdout) =20 return os.path.join(cidir, "cloud-init.iso") =20 @@ -424,6 +425,8 @@ def parse_args(vmcls): help=3D"Interactively run command") parser.add_option("--snapshot", "-s", action=3D"store_true", help=3D"run tests with a snapshot") + parser.add_option("--genisoimage", default=3D"genisoimage", + help=3D"iso imaging tool") parser.disable_interspersed_args() return parser.parse_args() =20 @@ -435,7 +438,8 @@ def main(vmcls): return 1 logging.basicConfig(level=3D(logging.DEBUG if args.debug else logging.WARN)) - vm =3D vmcls(debug=3Dargs.debug, vcpus=3Dargs.jobs) + vm =3D vmcls(debug=3Dargs.debug, vcpus=3Dargs.jobs, + genisoimage=3Dargs.genisoimage) if args.build_image: if os.path.exists(args.image) and not args.force: sys.stderr.writelines(["Image file exists: %s\n" % args.im= age, --=20 2.20.1