From: John Levon <john.levon@nutanix.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, "Cédric Le Goater" <clg@redhat.com>,
"Thanos Makatos" <thanos.makatos@nutanix.com>,
"Thomas Huth" <thuth@redhat.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Mark Cave-Ayland" <mark.caveayland@nutanix.com>
Subject: Re: [PATCH v4 3/3] tests/functional: add a vfio-user smoke test
Date: Tue, 9 Sep 2025 16:44:53 +0200 [thread overview]
Message-ID: <aMA9ZaxvzsTHR8se@lent> (raw)
In-Reply-To: <aL7rW6Tq9d-z8sGL@redhat.com>
On Mon, Sep 08, 2025 at 03:42:35PM +0100, Daniel P. Berrangé wrote:
> ...but no using of -snapshot here, so copying the asset would be
> required?
>
> Can we just use -snapshot in both cases & avoid the copying ?
Yes; thanks.
> > + def setup_vfio_user_pci_server(self, server_vm):
> > + for data to shuttle between its socket and the virtio serial port.
> > + """
> > + wait_for_console_pattern(self, 'login:', None, server_vm)
> > + exec_command_and_wait_for_pattern(self, 'root', '#', None, server_vm)
> > +
> > + exec_command_and_wait_for_pattern(self,
> > + 'gpio-pci-idio-16 -v /tmp/vfio-user.sock >/var/tmp/gpio.out 2>&1 &',
> > + '#', None, server_vm)
> > + # wait for libvfio-user to initialize properly
> > + exec_command_and_wait_for_pattern(self, 'sleep 5', '#', None, server_vm)
> > + exec_command_and_wait_for_pattern(self,
> > + 'socat UNIX-CONNECT:/tmp/vfio-user.sock /dev/vport0p1,ignoreeof ' +
> > + ' &', '#', None, server_vm)
>
> Hardcoded socket paths in /tmp ...
This is fine: we're inside the server VM at this point, so can't affect anything
else.
> > + sock_dir = self.socket_dir()
> > + socket_path = sock_dir.name + '/vfio-user.sock'
> > + socket_path = '/tmp/vfio-user.sock'
>
> This isn't honouring the temporary dir for the socket files.
Stray debug line left in, sorry.
> This temp dir needs to be passed into setup_vfio_user_pci_server
See above, this is a different socket to the one inside the VM.
> > + pattern = re.compile(r'^gpio:')
>
> Use of 're' is overkill here...
Sure, thanks.
regards
john
next prev parent reply other threads:[~2025-09-09 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 20:19 [PATCH v4 0/3] vfio-user client functional test John Levon
2025-09-03 20:19 ` [PATCH v4 1/3] tests/functional: return output from cmd.py helpers John Levon
2025-09-08 14:32 ` Daniel P. Berrangé
2025-09-03 20:19 ` [PATCH v4 2/3] tests/functional: add vm param to " John Levon
2025-09-08 14:33 ` Daniel P. Berrangé
2025-09-03 20:19 ` [PATCH v4 3/3] tests/functional: add a vfio-user smoke test John Levon
2025-09-08 14:42 ` Daniel P. Berrangé
2025-09-09 14:44 ` John Levon [this message]
2025-09-09 13:58 ` [PATCH v4 0/3] vfio-user client functional test Thomas Huth
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=aMA9ZaxvzsTHR8se@lent \
--to=john.levon@nutanix.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=mark.caveayland@nutanix.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thanos.makatos@nutanix.com \
--cc=thuth@redhat.com \
--cc=zhao1.liu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.