On Wed, 2016-03-09 at 16:02 +0100, Fabiano Fidêncio wrote: > Marc-André, > > On Tue, Mar 8, 2016 at 11:33 PM, Marc-André Lureau <mlureau@xxxxxxxxxx> wrote: > > Hi > > > > ----- Original Message ----- > > > 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 > > > > Even simpler and without having to add a property in API etc, use an > > environment variable? > > And then we would have to setup the env-var when running make check? :-\ I think you could set the env variable from the test itself. I already do this for several env variables to control the behavior of the mock acl helper. The reason that I didn't use an env variable was because I thought it would be a little more reliable if the behavior couldn't be affected by the user's environment. But I can certainly use that approach if people prefer it. > > > > > > ../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 > > > > > > _______________________________________________ > > > Spice-devel mailing list > > > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > > > https://lists.freedesktop.org/mailman/listinfo/spice-devel > > > > > _______________________________________________ > > Spice-devel mailing list > > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > > https://lists.freedesktop.org/mailman/listinfo/spice-devel _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel