qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: jasowang@redhat.com, qemu-devel@nongnu.org, leiyang@redhat.com,
	steven.sistare@oracle.com, yc-core@yandex-team.ru,
	peterx@redhat.com, mst@redhat.com, farosas@suse.de,
	eblake@redhat.com, armbru@redhat.com, thuth@redhat.com,
	philmd@linaro.org
Subject: Re: [PATCH v2 8/8] tests/functional: add test_x86_64_tap_fd_migration
Date: Wed, 3 Sep 2025 17:19:39 +0200	[thread overview]
Message-ID: <aLhci8UK4pAnAvjJ@redhat.com> (raw)
In-Reply-To: <2221a821-3650-435b-95d6-26c29c494c31@yandex-team.ru>

On Wed, Sep 03, 2025 at 06:14:36PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 03.09.25 17:47, Daniel P. Berrangé wrote:
> > On Wed, Sep 03, 2025 at 04:37:05PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> > > Add test for a new feature of local TAP migration with fd passing
> > > through unix socket.
> > > 
> > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> > > ---
> > >   .../test_x86_64_tap_fd_migration.py           | 347 ++++++++++++++++++
> > >   1 file changed, 347 insertions(+)
> > >   create mode 100644 tests/functional/test_x86_64_tap_fd_migration.py
> > > 
> > > diff --git a/tests/functional/test_x86_64_tap_fd_migration.py b/tests/functional/test_x86_64_tap_fd_migration.py
> > > new file mode 100644
> > > index 0000000000..f6d18fe39f
> > > --- /dev/null
> > > +++ b/tests/functional/test_x86_64_tap_fd_migration.py


> > > +def init_tap() -> None:
> > > +    run(f"ip tuntap add dev {TAP_ID} mode tap multi_queue")
> > > +    run(f"ip link set dev {TAP_ID} address {TAP_MAC}")
> > > +    run(f"ip addr add {HOST_IP_MASK} dev {TAP_ID}")
> > > +    run(f"ip link set {TAP_ID} up")
> > 
> > $ ip tuntap add dev foo mode tap multi_queue
> > ioctl(TUNSETIFF): Operation not permitted
> > 
> > 
> > The functional tests run as the developer's normal unprivileged user
> > account, so it doesn't look like this can work ?
> > 
> > Were you testing this as root ?
> 
> Yes I run the test with sudo..
> 
> Do we have any tests in QEMU that requires root? Or anyway to do this for functional tests? I'm afraid there is no way to setup TAP interface in unprivileged user account :(

There are a variety of iotests that include calls to sudo.

These automatically mark themselves as skipped if
password-less sudo fails to work. So in practice the tests
will rarely get run, but its better than nothing I guess.

We should add a skipUnlesPasswordlessSudo() method to the
tests/functional/qemu_test/decorators.py class, and you
then then annotate this test with that. Then just add sudo
to the "ip" calls.

With 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:[~2025-09-03 15:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 13:36 [PATCH v2 0/8] virtio-net: live-TAP local migration Vladimir Sementsov-Ogievskiy
2025-09-03 13:36 ` [PATCH v2 1/8] net/tap: add some trace points Vladimir Sementsov-Ogievskiy
2025-09-03 14:11   ` Daniel P. Berrangé
2025-09-03 14:26     ` Vladimir Sementsov-Ogievskiy
2025-09-05 12:33     ` Vladimir Sementsov-Ogievskiy
2025-09-03 13:36 ` [PATCH v2 2/8] net/tap: keep exit notifier only when downscript set Vladimir Sementsov-Ogievskiy
2025-09-03 13:37 ` [PATCH v2 3/8] net/tap: refactor net_tap_setup_vhost() Vladimir Sementsov-Ogievskiy
2025-09-03 13:37 ` [PATCH v2 4/8] qapi: add interface for local TAP migration Vladimir Sementsov-Ogievskiy
2025-09-10  6:28   ` Markus Armbruster
2025-09-10 10:29     ` Vladimir Sementsov-Ogievskiy
2025-09-03 13:37 ` [PATCH v2 5/8] net/tap: implement interfaces for local migration Vladimir Sementsov-Ogievskiy
2025-09-03 14:34   ` Daniel P. Berrangé
2025-09-03 15:31     ` Vladimir Sementsov-Ogievskiy
2025-09-03 16:09       ` Steven Sistare
2025-09-04  7:41         ` Vladimir Sementsov-Ogievskiy
2025-09-05 10:14           ` Vladimir Sementsov-Ogievskiy
2025-09-05 12:23             ` Steven Sistare
2025-09-03 13:37 ` [PATCH v2 6/8] virtio-net: support local tap migration Vladimir Sementsov-Ogievskiy
2025-09-03 13:37 ` [PATCH v2 7/8] test/functional: exec_command_and_wait_for_pattern: add vm arg Vladimir Sementsov-Ogievskiy
2025-09-03 13:37 ` [PATCH v2 8/8] tests/functional: add test_x86_64_tap_fd_migration Vladimir Sementsov-Ogievskiy
2025-09-03 14:47   ` Daniel P. Berrangé
2025-09-03 15:14     ` Vladimir Sementsov-Ogievskiy
2025-09-03 15:19       ` Daniel P. Berrangé [this message]
2025-09-03 15:24         ` Vladimir Sementsov-Ogievskiy
2025-09-04 14:42 ` [PATCH v2 0/8] virtio-net: live-TAP local migration Lei Yang
2025-09-04 15:05   ` 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=aLhci8UK4pAnAvjJ@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=farosas@suse.de \
    --cc=jasowang@redhat.com \
    --cc=leiyang@redhat.com \
    --cc=mst@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven.sistare@oracle.com \
    --cc=thuth@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    --cc=yc-core@yandex-team.ru \
    /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).