[Spice-devel] [PATCH spice-gtk 0/3] Add basic tests for usb-acl-helper
Jonathon Jongsma
jjongsma at redhat.com
Tue Mar 8 22:25:20 UTC 2016
This just adds a few basic tests to verify that we handle the usb-acl helper
properly. The first patch is actually a bugfix for an issue that was discovered
while writing the tests.
The second patch provides some infrastructure for the tests. I'm not sure that
adding this acl-helper-path property is the most elegant approach here, but
it is fairly simple. My initial approach was to re-compile
../src/usb-acl-helper.c and link it into the test (instead of linking the
test to the full libspice-client-glib-2.0 library). That would allow me to
re-compile it with a different ACL_HELPER_PATH #define which would allow me to
create a mock binary with the same name in a different directory and use that
one for testing. However, after fighting with automake for quite some time, I
abandoned that approach and took the easy way out.
The third patch adds a mock acl-helper binary and the test suite itself.
Jonathon Jongsma (3):
usb-acl-helper: Avoid deadlock when cancelled
SpiceUsbAclHelper: add "acl-helper-path" property
Add tests for usb-acl-helper
src/usb-acl-helper.c | 60 ++++++++++++++-
tests/Makefile.am | 15 ++--
tests/mock-acl-helper.c | 94 +++++++++++++++++++++++
tests/usb-acl-helper.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 359 insertions(+), 7 deletions(-)
create mode 100644 tests/mock-acl-helper.c
create mode 100644 tests/usb-acl-helper.c
--
2.4.3
More information about the Spice-devel
mailing list