qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: bleal@redhat.com, armbru@redhat.com, f4bug@amsat.org,
	wainersm@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com,
	crosa@redhat.com, marcandre.lureau@redhat.com, eblake@redhat.com
Subject: Re: [PATCH v3 3/3] avocado/vnc: add test_change_listen
Date: Wed, 9 Feb 2022 18:38:33 +0000	[thread overview]
Message-ID: <YgQKKTU//IYmbF70@redhat.com> (raw)
In-Reply-To: <20220118160909.2502374-4-vsementsov@virtuozzo.com>

On Tue, Jan 18, 2022 at 05:09:09PM +0100, Vladimir Sementsov-Ogievskiy wrote:
> Add simple test-case for new addresses argument of display-reload qmp
> command.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  tests/avocado/vnc.py | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/tests/avocado/vnc.py b/tests/avocado/vnc.py
> index 096432988f..936285a50b 100644
> --- a/tests/avocado/vnc.py
> +++ b/tests/avocado/vnc.py
> @@ -51,3 +51,13 @@ def test_change_password(self):
>          set_password_response = self.vm.qmp('change-vnc-password',
>                                              password='new_password')
>          self.assertEqual(set_password_response['return'], {})
> +
> +    def test_change_listen(self):
> +        self.vm.add_args('-nodefaults', '-S', '-vnc', ':0')
> +        self.vm.launch()
> +        self.assertEqual(self.vm.qmp('query-vnc')['return']['service'], '5900')

Add a check that socket connect(5900)  works here and connect(5901)
and connect(5902) fails...


> +        res = self.vm.qmp('display-reload', type='vnc',
> +                          addresses=[{'type': 'inet', 'host': '0.0.0.0',
> +                                      'port': '5901'}])

I'd suggest we provide multiple addresses to test multi address
changes on distinct IPs too

                           addresses=[{'type': 'inet', 'host': '0.0.0.0',
                                       'port': '5901'},
                                      {'type': 'inet', 'host': '127.0.0.1',
                                       'port': '5902'}]

> +        self.assertEqual(res['return'], {})
> +        self.assertEqual(self.vm.qmp('query-vnc')['return']['service'], '5901')

and connect(5900) fails here, and connect(5901) + connet(5902) works .


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2022-02-09 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 16:09 [PATCH v3 0/3] qapi/ui: change vnc addresses Vladimir Sementsov-Ogievskiy
2022-01-18 16:09 ` [PATCH v3 1/3] ui/vnc: refactor arrays of addresses to SocketAddressList Vladimir Sementsov-Ogievskiy
2022-02-09 18:22   ` Daniel P. Berrangé
2022-01-18 16:09 ` [PATCH v3 2/3] qapi/ui: display-reload: add possibility to change listen address Vladimir Sementsov-Ogievskiy
2022-02-09 18:33   ` Daniel P. Berrangé
2022-02-10  9:39     ` Vladimir Sementsov-Ogievskiy
2022-01-18 16:09 ` [PATCH v3 3/3] avocado/vnc: add test_change_listen Vladimir Sementsov-Ogievskiy
2022-02-09 18:38   ` Daniel P. Berrangé [this message]
2022-02-09 16:55 ` [PATCH v3 0/3] qapi/ui: change vnc addresses Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YgQKKTU//IYmbF70@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).