From nobody Fri Nov 14 20:44:38 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=1589894952; cv=none; d=zohomail.com; s=zohoarc; b=kOMUWlawV5fSughFQV8OQ6s3gLk0GxMu+oT9Alh1Slnh1R6i9R8qCere1cdk+e7tTxkPd24rkeyGhGU7ilZRq1gJFtoWYXGk3XHngKhYxODSx+nwYv+0bZrwjhUEUuZ8MZx1fo/q0o1TkiNJe9dgQ6LwwwT55+e2dNuRThAaVOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589894952; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=3Vk2YxYa+tG5UTyKoahl0yAp9z7THOYwxY7ndiKe1+U=; b=bfBHhFvH8ZvxsgowR/rORA1oBxi0szx6RBIq2VqA6ydQuCni7Dk0bFenkklCRs+hXQ99d/95OjXPhku5xZ1gkdadGPxRUdMVr3favG9gwiS9Xg1sB7Z/rFi0OFHKLqLMWbpzuet+eSQgh1a6mgBm1vNfuafhHcK+wknLqsl9kBY= 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 1589894952246292.98142319512954; Tue, 19 May 2020 06:29:12 -0700 (PDT) Received: from localhost ([::1]:35248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb2Ix-0000W2-1h for importer@patchew.org; Tue, 19 May 2020 09:29:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb2Gk-0004tP-A9 for qemu-devel@nongnu.org; Tue, 19 May 2020 09:26:54 -0400 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:43539) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jb2Gj-0008Iq-FP for qemu-devel@nongnu.org; Tue, 19 May 2020 09:26:54 -0400 Received: by mail-qt1-x832.google.com with SMTP id o19so11031374qtr.10 for ; Tue, 19 May 2020 06:26:53 -0700 (PDT) Received: from Rfoley-MA01.hsd1.ma.comcast.net ([2601:199:4480:60c0:dd6a:8c63:cd9d:ad15]) by smtp.gmail.com with ESMTPSA id d74sm3482136qke.100.2020.05.19.06.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:26:51 -0700 (PDT) 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; bh=3Vk2YxYa+tG5UTyKoahl0yAp9z7THOYwxY7ndiKe1+U=; b=FAry0/EUJF89bPOTbUwE01jocSeVcd7yzl7o3W/1pnXiycMiSEAGLqUQNEMIS7E+SR okZRbUN+xiSRwgnqMYtK//a+rLPp95E3aomaneQm4+VU6vUiFNKHXk24eSLuonCRBU7V lXpwcz+bDrUKJZh1wuhszf1G34rWvmYYbOpkKiNE5tMIogbWOTnP+ALBSMdFGtbuGhrB 5VTjecEUnwEMc7gmDAEah/Iu3/s2IDN0+1IVkQyC9GGD6f84/geay6J8PN8Fz73fkjdv rNlbFYG+Wk/TPby7ZdqTYu+mxKjkkK+qWshPyR+uqUwovDb8k8Be32VUkFZBd3UPCVFh Bc+g== 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; bh=3Vk2YxYa+tG5UTyKoahl0yAp9z7THOYwxY7ndiKe1+U=; b=U/NUDt0b6l5AgZ/XjqIMobZEpIWYvRtRJ9lhmk8+gCN6r6wX3epT/9jsw0QYQtQ0uy dCYJdGLCFMBymVQPrJd1gRN3t4GkIK4HOwp+iBdyVx7pTB9R+pnQX59xiMqrw4pdYOCm 3vtooDrTVxb5DNp5A80vjMblSi62vF9SJbklOd0gSyUlsfhlsOEyJoU7iCu3wgZIx0QH HccUW+lphBnwrQ3cYuurMW3caBu1ORLkVqVB/p8dUqzpDcEvCNFo5La1OoWKLNX7zSQw 7DXr5PHFJDjoKsYTLETV5GNRrUHkvIU94EwUK4bvTsIvYUalWf3f+bnuJIEEYUWpHM8Z 5SaA== X-Gm-Message-State: AOAM5304mxvvUJt/0uVvV6WgjaMh8ihYA1bhwu2EvMXK/mvM4mTsfOk2 aN7jymfp5N0P/wQXlFoY6Ui6GdWOLSM2Aw== X-Google-Smtp-Source: ABdhPJyZwdkXKKTg+7GYqk0tjyW4TUHGjS+lo4KMIPKqkS/Zr/w1Tg1kMWHO4iIBEUCO/Ykf/Ec9Fg== X-Received: by 2002:aed:257c:: with SMTP id w57mr21901274qtc.208.1589894812164; Tue, 19 May 2020 06:26:52 -0700 (PDT) From: Robert Foley To: qemu-devel@nongnu.org Subject: [PATCH v7 03/12] tests/vm: pass args through to BaseVM's __init__ Date: Tue, 19 May 2020 09:22:50 -0400 Message-Id: <20200519132259.405-4-robert.foley@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200519132259.405-1-robert.foley@linaro.org> References: <20200519132259.405-1-robert.foley@linaro.org> 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=2607:f8b0:4864:20::832; envelope-from=robert.foley@linaro.org; helo=mail-qt1-x832.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: philmd@redhat.com, alex.bennee@linaro.org, robert.foley@linaro.org, peter.puhov@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e --- tests/vm/basevm.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index a2d4054d72..fbefda0595 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -61,9 +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, genisoimage=3DNone): + def __init__(self, args): self._guest =3D None - self._genisoimage =3D genisoimage + self._genisoimage =3D args.genisoimage self._tmpdir =3D os.path.realpath(tempfile.mkdtemp(prefix=3D"vm-te= st-", suffix=3D".tmp", dir=3D".")) @@ -76,7 +76,7 @@ class BaseVM(object): self._ssh_pub_key_file =3D os.path.join(self._tmpdir, "id_rsa.pub") open(self._ssh_pub_key_file, "w").write(SSH_PUB_KEY) =20 - self.debug =3D debug + self.debug =3D args.debug self._stderr =3D sys.stderr self._devnull =3D open(os.devnull, "w") if self.debug: @@ -90,8 +90,8 @@ class BaseVM(object): (",ipv6=3Dno" if not self.ipv6 else ""), "-device", "virtio-net-pci,netdev=3Dvnet", "-vnc", "127.0.0.1:0,to=3D20"] - if vcpus and vcpus > 1: - self._args +=3D ["-smp", "%d" % vcpus] + if args.jobs and args.jobs > 1: + self._args +=3D ["-smp", "%d" % args.jobs] if kvm_available(self.arch): self._args +=3D ["-enable-kvm"] else: @@ -438,8 +438,7 @@ 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, - genisoimage=3Dargs.genisoimage) + vm =3D vmcls(args) 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.17.1