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
