nutanix / libvfio-user

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

Prepare python test helpers for receiving commands #774

Closed mnissler-rivos closed 10 months ago

mnissler-rivos commented 11 months 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.