[Spice-devel] [PATCH spice-streaming-agent v3 0/5] nonblocking mode for stream port and some refactor

Lukáš Hrázký lhrazky at redhat.com
Fri May 18 12:32:04 UTC 2018


Changes since v2:
- Removed the acked and pushed commits.
- Fixed accidental removal of test-mjpeg-fallback from TESTS.
- Added the copyright header to test-stream-port.
- Separated the fix for indefinitely looping read on a closed virtio
  port into it's own patch (including the test case).
- Moved the test case for the write on a closed virtio port to the
  nonblocking patch. (While it technically works in the blocking mode,
  it works only in the test and not in the real case, unfortunately.
  It's still hypocricy though :))
- Put the while (!quit_requested) loop back into read_command in patch
  5/5, it serves to read multiple commands at once.


Lukáš Hrázký (5):
  Add a unit test for the stream port
  Fix reading from a closed virtio port
  Change the mode to NONBLOCK for the virtio port
  Encapsulate the stream port fd and locking
  Refactor and simplify polling for messages to read

 src/error.hpp                      |   2 +
 src/spice-streaming-agent.cpp      | 144 +++++++++++++++++--------------------
 src/stream-port.cpp                |  72 +++++++++++++++++--
 src/stream-port.hpp                |  14 ++++
 src/unittests/.gitignore           |   1 +
 src/unittests/Makefile.am          |   8 +++
 src/unittests/test-stream-port.cpp |  87 ++++++++++++++++++++++
 7 files changed, 244 insertions(+), 84 deletions(-)
 create mode 100644 src/unittests/test-stream-port.cpp

-- 
2.16.2



More information about the Spice-devel mailing list