On 08/25/2011 09:29 AM, Brian Nesbitt wrote:
Hello folks,

Apologies if this question has been asked, before (I searched but couldn't find 
anything).

I'm playing around with a few plugins and want to run some unit tests on my 
code but they fail at linking due to unresolved symbols. For example:
undefined reference to `TSMBufferCreate'
etc... I'm linking against libtsutil.so and libtsmgmt.so in this case.

Running nm on the shared libs shows that TSMBufferCreate isn't located in the 
libraries:
$ nm libtsutil.so | c++filt | grep BufferCreate
$ nm libtsmgmt.so | c++filt | grep BufferCreate

So while I can get my plugins working within Traffic Server, do you have any 
guidance as to how I can unit test my code?


Those symbols are in the "core" of ATS only. THe way to work around this for "unit tests" is to have stub libraries, implementing all these core APIs. I know Yahoo did something like that a while ago, but it was not open sourced.

-- leif

  • SDK help Brian Nesbitt
    • Re: SDK help Leif Hedstrom

Reply via email to