From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF780C433FE for ; Thu, 16 Sep 2021 14:37:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CF5A611F2 for ; Thu, 16 Sep 2021 14:37:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7CF5A611F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:52188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQsVc-0004EA-J6 for qemu-devel@archiver.kernel.org; Thu, 16 Sep 2021 10:37:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQsMQ-0002AF-5a for qemu-devel@nongnu.org; Thu, 16 Sep 2021 10:27:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQsMM-0000oo-39 for qemu-devel@nongnu.org; Thu, 16 Sep 2021 10:27:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631802448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4d7H7h2UYcjJpWSlR0AOECr2g2yOzDQfhssBgfg/HcU=; b=cZgH1LkhECJ/b4nnvQC+P/bThnt1nC5aXEmTDLIiHgliCxRdpab6jn3hDwx8Ylig9jzSPf 6QpEbrC+miSfg4H6h00DoDMCHu/LUe4630LsYQ2F79xvdf4xynMkThHoPS/gvUuN+ubMWS eeDk2UWQ35TtwJUQwnnQGc8ay4aWvnc= Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-148-H5f_eFXzPyOU_UUzFrr5Ew-1; Thu, 16 Sep 2021 10:27:24 -0400 X-MC-Unique: H5f_eFXzPyOU_UUzFrr5Ew-1 Received: by mail-ot1-f70.google.com with SMTP id r14-20020a056830080e00b0053b7b79c0d0so28805902ots.6 for ; Thu, 16 Sep 2021 07:27:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4d7H7h2UYcjJpWSlR0AOECr2g2yOzDQfhssBgfg/HcU=; b=m0ofOcMv+5jKnaP72lgoH4RRb/gLR7eK5ybcGO+MhkA2WSe68Q+YVIsmaof1ACJ/oi xPXer7e7WquvPm1QCwQucZSiIaCorMLKMG+v0H6DMbmKiDQL8c+oRvdxGW4nX3EgLcpe SfTNnTOFaEkyGB5CQoM/Da4Qae8jsMLusqWeo4eunKttMQX3naOsqSIqhTPOeqqjejoU W9QI+7Q3rbBXkiwp2LLz+AuvPbnsgUK4f7zWKEU7iV5oXynvjN4AoUIJwhglUB0miepU DBFb/65uldDJPyTogXxuqpzjDu/OurJfZgt0NfjC9NDxEzunWacB7XcRxdFK39mg2vQd H7WA== X-Gm-Message-State: AOAM533lpnlqV1GcuKkpMlvGQidJcjTa2M/L+YBMEVtajCRh3UdYuN8+ b7/d857HWcK+bHLk+/jqWbO59UyW9EHU9vgy8uCeptrE64E0JMmZWBXdxrILos067MlvtxFbSbR HsRXLYDYHFWwQSSzpgcD6rf4iA0p7auk= X-Received: by 2002:a05:6830:2685:: with SMTP id l5mr1224006otu.129.1631802443930; Thu, 16 Sep 2021 07:27:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+8cEkB4OGv9lvzz+lPLKqa++81xFPWwvcvs9r2yeT2HvZdORO8qYZvUHANsNidc3P3oo6WzcJ5tbl4cwlYsM= X-Received: by 2002:a05:6830:2685:: with SMTP id l5mr1223979otu.129.1631802443703; Thu, 16 Sep 2021 07:27:23 -0700 (PDT) MIME-Version: 1.0 References: <20210916040955.628560-1-jsnow@redhat.com> <20210916040955.628560-3-jsnow@redhat.com> In-Reply-To: From: John Snow Date: Thu, 16 Sep 2021 10:27:12 -0400 Message-ID: Subject: Re: [PATCH v3 02/16] iotests/mirror-top-perms: Adjust imports To: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="00000000000000385605cc1d9da0" Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.392, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: Kevin Wolf , Vladimir Sementsov-Ogievskiy , Eduardo Habkost , qemu-block@nongnu.org, Markus Armbruster , qemu-devel , Hanna Reitz , Cleber Rosa Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --00000000000000385605cc1d9da0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 16, 2021 at 12:27 AM Philippe Mathieu-Daud=C3=A9 wrote: > On 9/16/21 6:09 AM, John Snow wrote: > > We need to import things from the qemu namespace; importing the > > namespace alone doesn't bring the submodules with it -- unless someone > > else (like iotests.py) imports them too. > > > > Adjust the imports. > > > > Signed-off-by: John Snow > > --- > > tests/qemu-iotests/tests/mirror-top-perms | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/tests/qemu-iotests/tests/mirror-top-perms > b/tests/qemu-iotests/tests/mirror-top-perms > > index 2fc8dd66e0..de18182590 100755 > > --- a/tests/qemu-iotests/tests/mirror-top-perms > > +++ b/tests/qemu-iotests/tests/mirror-top-perms > > @@ -25,7 +25,8 @@ from iotests import qemu_img > > > > # Import qemu after iotests.py has amended sys.path > > # pylint: disable=3Dwrong-import-order > > -import qemu > > +from qemu import qmp > > +from qemu.machine import machine > > Not straight-forward import name... > > You mean the 'qemu.machine.machine' path? If so, I agree. It will be fixed when I refactor QEMUMachine. A/QMP happens first. > Reviewed-by: Philippe Mathieu-Daud=C3=A9 > > --00000000000000385605cc1d9da0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Sep 16, 2021 at 12:27 AM Phil= ippe Mathieu-Daud=C3=A9 <philmd@red= hat.com> wrote:
On 9/16/21 6:09 AM, John Snow wrote:
> We need to import things from the qemu namespace; importing the
> namespace alone doesn't bring the submodules with it -- unless som= eone
> else (like iotests.py) imports them too.
>
> Adjust the imports.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>=C2=A0 tests/qemu-iotests/tests/mirror-top-perms | 7 ++++---
>=C2=A0 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qemu-iotests/tests/mirror-top-perms b/tests/qemu-io= tests/tests/mirror-top-perms
> index 2fc8dd66e0..de18182590 100755
> --- a/tests/qemu-iotests/tests/mirror-top-perms
> +++ b/tests/qemu-iotests/tests/mirror-top-perms
> @@ -25,7 +25,8 @@ from iotests import qemu_img
>=C2=A0
>=C2=A0 # Import qemu after iotests.py has amended sys.path
>=C2=A0 # pylint: disable=3Dwrong-import-order
> -import qemu
> +from qemu import qmp
> +from qemu.machine import machine

Not straight-forward import name...


You mean the 'qemu.machine.machine= ' path? If so, I agree. It will be fixed when I refactor QEMUMachine. A= /QMP happens first.
=C2=A0
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <philmd@redhat.com>

--00000000000000385605cc1d9da0--