You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Brian Nesbitt <Br...@openwave.com> on 2011/08/25 17:29:12 UTC

SDK help

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?

Thanks
Brian.





Re: SDK help

Posted by Leif Hedstrom <zw...@apache.org>.
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