The Wrapper Project
jelmer at samba.org
Wed Jul 10 15:05:02 MDT 2013
On Tue, Jul 09, 2013 at 04:35:10PM +0200, Andreas Schneider wrote:
> in the Samba project we have some wrapper we link against each
> executable and library to be able to run 'make test'. As you might
> know I've been working to get uid_wrapper , nss_wrapper  and
> socket_wrapper  working as libraries you can load into any
> application using LD_PRELOAD (man ld.so). If you can preload one of
> these libraries you can use it with whatever project you want and
> you can create tests with optimized binaries.
> To get it working I needed to improve the wrappers and also add new
> important features. The biggest feature in nss_wrapper is that it
> provides name resolution using its own hosts file now. So you can
> call getaddrinfo() to resolve hosts in socket_wrapper.
> socket_wrapper got a destructor to cleanup UDP socket files.
> uid_wrapper still needs work, to make sure that it is thread safe.
Great, thanks very much for working on that! It'd be great to have
these available elsewhere.
> On the way to get 'make test' in Samba working I found serveral bugs
> which I already sent patches for. The remaining patches are my git
> repository . I've changed selftest to write a hosts file for
> name resolution and changed waf to look for the preloadable system
> version of the wrappers. I have removed nss_wrapper, socket_wrapper
> and uid_wrapper from the Samba source code for now. I want to
> maintain and improve them outside of the Samba tree.
> Currently the git trees live on my own infrastructure but I'm also
> happy to create git repos on git.samba.org if you prefer that.
What committers/commit policy would you suggest for these?
> Yes, you have to install them first into the system before running
> them. If you can't do that you can still set the LD_LIBRARY_PATH to
> point to a directory where you have installed them. If you vote
> against the removal of them from the Samba tree, then we could just
> pull the code from time to time from the other repsositories like we
> do it with heimdal or subunit. I'm against this but we have
> developers which would like to have everthing in the source tree.
> Alternatively, we could use git submodules for that.
> My work on the wrappers is not finished yet. They still need to be
> checked on different platforms and we need more tests to easier
> verify that they are working correctly. socket_wrapper is already
> tested on several platforms  and works on MacOSX too.
The argument for keeping copies of the other software in-tree has
always been that it should be possible to hack on samba without having
to install a bunch of dependencies, as that may not be easy on all
platforms. I guess you can still build Samba without the wrappers and that is
probably sufficient - you only need to install these if you want to
run the testsuite.
We need a strategy for the build farm hosts. It is annoying to
install something as root on all build farm hosts - and to install
newer versions when we come across regressions.
We should probably do the same (bundle, submodule, require
installation) for testtools/subunit as we do for the
Personally, I would prefer using submodules and just having "make
dist" include copies of the wrappers and testtools/subunit in the
tarball and the tree that is used by the buildfarm hosts.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the samba-technical