nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
168 stars 51 forks source link

Prepare python test helpers for receiving commands #774

Closed mnissler-rivos closed 1 year ago

mnissler-rivos commented 1 year ago

Thus far, the python test code has only ever sent messages of type commands to the server and processed the corresponding replies. For the twin-socket feature, the tests will exercise flows where DMA access commands must be received, processed, and replied to by the client.

This change refactors the message handling python test code to provide functions to handle server-to-client commands, reusing existing code as appropriate.