[LAD] [RFC] jacksquat - a mock jack library (was Re: Testdriven development with JACK?)

Gabriel Beddingfield gabrbedd at gmail.com
Mon Aug 1 12:25:07 UTC 2011


On 07/27/2011 05:24 PM, Adrian Knoth wrote:
> OTOH, if there are existing mocking libraries for jackd, things might be
> a bit more straight forward (provide an input buffer to be returned by
> jack_port_get_buffer, call the process function and check the result
> that's written to the output buffer).

In a fit of inspiration, here's a proof of concept for a mock
jack library:

     https://gitorious.org/gabrbedd/jacksquat
     git://gitorious.org/gabrbedd/jacksquat.git

I invite your comments, criticisms, and snide remarks. :-)
See the README and DEVELOPERS files for more info.  Personally,
I've convinced myself that it's a worthwhile effort.

In a nutshell... run your application through the mock
library like this[1]:

     $ jacksquat -no-enforce-deprecated \
         lv2_jack_host \
         http://gabe.is-a-geek.org/composite/plugins/sampler/1

This will set your LD_LIBRARY_PATH to use the mock, and tell it *not*
to crash when a deprecated interface is used.

STATUS:  Clients can register and the process() callback will be
called.  However, ports and such are not yet implemented.  Some
apps will seem to work OK, but some others will understandably
crash.

WHERE TO HELP:  Need people to write tests that test the JACK API.
These are simple programs that will work with any properly functioning
libjack.so.0.  While these tests will help us track that API
implementation in jacksquat, these tests will be valid unit
tests for Jack1, Jack2, tschack, etc. (FTW)

PS: Jack Interposer is awesome.  I'd like to integrate it with
this tool somehow.  Nice job Arnout!

-gabriel

[1] lv2_jack_host does *not* use deprecated interfaces.  I just
     added it to illustrate the ability to configure the mock
     library.



More information about the Linux-audio-dev mailing list