[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by d
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default |
Date: |
Wed, 24 Mar 2021 18:28:14 -0400 |
On Wed, Mar 24, 2021 at 12:30:18PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Wed, Mar 24, 2021 at 2:23 AM Cleber Rosa <crosa@redhat.com> 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 <crosa@redhat.com>
> > ---
> > 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 = 900
> > chksum = None
> >
> > - def setUp(self, ssh_pubkey=None):
> > + def setUp(self, ssh_pubkey=None, network_device_type='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=vnet,hostfwd=:127.0.0.1:0
> > -:22',
> > + '-device', '%s,netdev=vnet' %
> > network_device_type)
> > self.set_up_boot()
> > if ssh_pubkey is None:
> > ssh_pubkey, self.ssh_key = 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=ttyS0 root=/dev/sda1')
> >
> > - # Allow us to connect to SSH
> > - self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0
> > -:22',
> > - '-device', 'virtio-net,netdev=vnet')
> > -
> > 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.
>
That's a good point, should be possible. I'll look into that.
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
>
> --
> Marc-André Lureau
Thanks,
- Cleber.
signature.asc
Description: PGP signature
- Re: [PATCH v2 07/10] Acceptance Tests: set up SSH connection by default after boot for LinuxTest, (continued)
- [PATCH v2 10/10] Acceptance Tests: introduce CPU hotplug test, Cleber Rosa, 2021/03/23
- [PATCH v2 08/10] tests/acceptance/virtiofs_submounts.py: remove launch_vm(), Cleber Rosa, 2021/03/23
- [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default, Cleber Rosa, 2021/03/23
- [PATCH v2 09/10] Acceptance Tests: add basic documentation on LinuxTest base class, Cleber Rosa, 2021/03/23
- Re: [PATCH v2 00/10] Acceptance Test: introduce base class for Linux based tests, Wainer dos Santos Moschetta, 2021/03/25