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=-7.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 306FEC433C1 for ; Wed, 24 Mar 2021 08:33:34 +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 7D3FD619D5 for ; Wed, 24 Mar 2021 08:33:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D3FD619D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOyxI-00024U-G6 for qemu-devel@archiver.kernel.org; Wed, 24 Mar 2021 04:33:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOyuP-0008TH-Rn for qemu-devel@nongnu.org; Wed, 24 Mar 2021 04:30:33 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:40713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOyuN-0006cQ-TI for qemu-devel@nongnu.org; Wed, 24 Mar 2021 04:30:33 -0400 Received: by mail-ej1-x632.google.com with SMTP id u9so31431055ejj.7 for ; Wed, 24 Mar 2021 01:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wLg4pibvzBfK9N/3UzRSj9cjvwGJyVikzEBaBYa0tCA=; b=cJdDQhFEp2bVgTZ3bP86h7BzidG9HLuZQdMW7jfGFw0dWXyT5pnG0vyHCaKwgdlRDy NaDsCyAZ8KKlrmChVt/gTEFud3GWO/Jr7Fr2SCtR2JbHwa7HpdIl71ic/8VwEm7kaJs3 1MiL3cAb0Yq5Oz3UauJXo2WNGXKz660IPq4+fgzg/iXNehUxrEEjP+MG4hZf4kCP2WBw KowCXJ2pY+HUX6GYXvY3a9Sjxto23a/IiPq6FQjnB1OyMNL3pWLHHrTIaxNaIFd3/ZO7 6g7N0ZUrcQg/Wx5sssKpUlWWrwtKmxL9f8EQbSWIJT+N2ltx+4yEi56tw6E9iU/ZIL0f cBkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wLg4pibvzBfK9N/3UzRSj9cjvwGJyVikzEBaBYa0tCA=; b=R3Cjij1RTFS0hW934bTs8UU/5+yCD/y6QZG3Tg9L4JGWY1vjSFTTiTFPmxIN2Ulk9s JWIeGPJtYvmSHRwn0GW/RjUnd8w/CYEdZ0k/w7pbdJSk8bIL27vqwu1GDOKuN8F9ppSH 3TEoLqbphLpYUIqWaOoFXAJ1eJEGTOC7Pekbu42gHXSU/gKwEtZ+TguldZyUQ8NYKUoN oNmgn9g3ombKXlUYZI084yg1MXx/ETrpwP6a0SBnrTVKgUhJ2eyVXqVp1yOTiA2jpqvA X/NeldKCbhLi3ZdFXN8b7tC8xG08o1GXXqIrpxa0lhIOSddlGs9OdR75+hZLaSsJ3ygV bGTA== X-Gm-Message-State: AOAM531CcQNC4C6RPJneAZP97g+qVtA+Qgmt71L4S6OH/FHzhjNzr9Ub xiPGbcYVLwgs+xq+DDGblhaZ9VWwVy9C5ykIkn4= X-Google-Smtp-Source: ABdhPJyE0seTZ96roPIOS8iwyhh+AOB5itXkBle8qqOt5Bcr/A9meZ9W0RxYW6Pwm2fm4IvFdW14fmpmJrfGTeQN0z4= X-Received: by 2002:a17:906:a1c8:: with SMTP id bx8mr2356607ejb.381.1616574630301; Wed, 24 Mar 2021 01:30:30 -0700 (PDT) MIME-Version: 1.0 References: <20210323221539.3532660-1-crosa@redhat.com> <20210323221539.3532660-6-crosa@redhat.com> In-Reply-To: <20210323221539.3532660-6-crosa@redhat.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 24 Mar 2021 12:30:18 +0400 Message-ID: Subject: Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default To: Cleber Rosa Content-Type: multipart/alternative; boundary="0000000000009797da05be441c15" Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=marcandre.lureau@gmail.com; helo=mail-ej1-x632.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: Fam Zheng , Aleksandar Rikalo , Eduardo Habkost , John Snow , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , Wainer dos Santos Moschetta , QEMU , Willian Rampazzo , Eric Auger , Willian Rampazzo , Thomas Huth , Max Reitz , =?UTF-8?B?QWxleCBCZW5uw6ll?= , Aurelien Jarno , Beraldo Leal Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000009797da05be441c15 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Wed, Mar 24, 2021 at 2:23 AM Cleber Rosa wrote: > For users of the LinuxTest class, let's set up the VM with the port > redirection for SSH, instead of requiring each test to set the same > arguments. > > Signed-off-by: Cleber Rosa > --- > tests/acceptance/avocado_qemu/__init__.py | 4 +++- > tests/acceptance/virtiofs_submounts.py | 4 ---- > 2 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/tests/acceptance/avocado_qemu/__init__.py > b/tests/acceptance/avocado_qemu/__init__.py > index 67f75f66e5..e75b002c70 100644 > --- a/tests/acceptance/avocado_qemu/__init__.py > +++ b/tests/acceptance/avocado_qemu/__init__.py > @@ -309,10 +309,12 @@ class LinuxTest(Test, LinuxSSHMixIn): > timeout =3D 900 > chksum =3D None > > - def setUp(self, ssh_pubkey=3DNone): > + def setUp(self, ssh_pubkey=3DNone, network_device_type=3D'virtio-net= '): > super(LinuxTest, self).setUp() > self.vm.add_args('-smp', '2') > self.vm.add_args('-m', '1024') > + self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1= :0 > -:22', > + '-device', '%s,netdev=3Dvnet' % > network_device_type) > self.set_up_boot() > if ssh_pubkey is None: > ssh_pubkey, self.ssh_key =3D self.set_up_existing_ssh_keys() > diff --git a/tests/acceptance/virtiofs_submounts.py > b/tests/acceptance/virtiofs_submounts.py > index bed8ce44df..e10a935ac4 100644 > --- a/tests/acceptance/virtiofs_submounts.py > +++ b/tests/acceptance/virtiofs_submounts.py > @@ -207,10 +207,6 @@ def setUp(self): > self.vm.add_args('-kernel', vmlinuz, > '-append', 'console=3DttyS0 root=3D/dev/sda= 1') > > - # Allow us to connect to SSH > - self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1= :0 > -:22', > - '-device', 'virtio-net,netdev=3Dvnet') > - > self.require_accelerator("kvm") > self.vm.add_args('-accel', 'kvm') > > -- > 2.25.4 > > Looks fine, I suppose it could eventually be in LinuxSSHMixIn too for other users. Reviewed-by: Marc-Andr=C3=A9 Lureau --=20 Marc-Andr=C3=A9 Lureau --0000000000009797da05be441c15 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Wed, Mar 24, 2021 at 2:23 AM Cle= ber Rosa <crosa@redhat.com> w= rote:
For users = of the LinuxTest class, let's set up the VM with the port
redirection for SSH, instead of requiring each test to set the same
arguments.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
=C2=A0tests/acceptance/avocado_qemu/__init__.py | 4 +++-
=C2=A0tests/acceptance/virtiofs_submounts.py=C2=A0 =C2=A0 | 4 ----
=C2=A02 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py
index 67f75f66e5..e75b002c70 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -309,10 +309,12 @@ class LinuxTest(Test, LinuxSSHMixIn):
=C2=A0 =C2=A0 =C2=A0timeout =3D 900
=C2=A0 =C2=A0 =C2=A0chksum =3D None

-=C2=A0 =C2=A0 def setUp(self, ssh_pubkey=3DNone):
+=C2=A0 =C2=A0 def setUp(self, ssh_pubkey=3DNone, network_device_type=3D= 9;virtio-net'):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0super(LinuxTest, self).setUp()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.vm.add_args('-smp', '2&#= 39;)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.vm.add_args('-m', '1024&= #39;)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.add_args('-netdev', 'user,= id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22',
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0'-device', '%s,netdev=3Dvnet' % network_de= vice_type)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.set_up_boot()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ssh_pubkey is None:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ssh_pubkey, self.ssh_key = =3D self.set_up_existing_ssh_keys()
diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virt= iofs_submounts.py
index bed8ce44df..e10a935ac4 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -207,10 +207,6 @@ def setUp(self):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.vm.add_args('-kern= el', vmlinuz,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-append', 'console=3DttyS0 roo= t=3D/dev/sda1')

-=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Allow us to connect to SSH
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.add_args('-netdev', 'user,= id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22',
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0'-device', 'virtio-net,netdev=3Dvnet')
-
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.require_accelerator("kvm")=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.vm.add_args('-accel', 'k= vm')

--
2.25.4


Looks fine, I suppose it could eventua= lly be in LinuxSSHMixIn too for other users.

Revie= wed-by: Marc-Andr=C3=A9 Lureau <marcandre.lureau@redhat.com>

<= br>--
Marc-Andr=C3=A9 Lureau=
--0000000000009797da05be441c15--