[SSSD] cwrap test roadblock

Lukas Slebodnik lslebodn at redhat.com
Mon Dec 1 17:55:09 UTC 2014


On (01/12/14 11:53), Simo Sorce wrote:
>On Mon, 1 Dec 2014 09:27:11 +0100
>Lukas Slebodnik <lslebodn at redhat.com> wrote:
>
>> On (29/11/14 23:32), Simo Sorce wrote:
>> >On Fri, 28 Nov 2014 12:01:29 +0100
>> >Sumit Bose <sbose at redhat.com> wrote:
>> >
>> >> On Thu, Nov 27, 2014 at 03:09:32PM +0200, Nikolai Kondrashov wrote:
>> >> > Hi everyone,
>> >> > 
>> >> > While trying to arrange running sssd under cwrap in "make check"
>> >> > I came upon this roadblock:
>> >> > 
>> >> > There doesn't seem to be a way to make libnsss_sss use server
>> >> > sockets in non-default location at runtime, only at build time.
>> >> > And it seems that doing it at runtime would be a security issue.
>> >> > 
>> >> > That means that we can't include tests involving libnss_sss into
>> >> > "make check", as that is not guaranteed to be invoked on a build
>> >> > with a special location where the current user can write to.
>> >> > 
>> >> > This leaves us with being able to run these tests under CI only,
>> >> > which can arrange for special configure options and thus
>> >> > locations.
>> >> > 
>> >> > Could there be another way? Am I missing something?
>> >> 
>> >> It is a bit hackish, but maybe with something like
>> >> http://ohnopub.net/~ohnobinki/bin_replace_string/ a copy of the
>> >> libnss_sss can be created during makr test with alternative paths
>> >> which are better suited for the tests?
>> >
>> >I do something like that (binary patching) here:
>> >https://fedorapeople.org/cgit/simo/public_git/gss-proxy.git/tree/proxy/tests/runtests.py#n238
>> >
>> >Works ok :-)
>> >
>> Why is it better than different prefix?
>
>Because you can run tests when building RPMs this way, otherwise you'll
>have to disable make check, or parts of it when building RPMs.
>
It make sense if the test will be short ( < 5 minutes). I do not expect that
all cwrap tests will take less than 5 minutes. We don't have them yet, but
there is lot of things which can be tested with sssd openldap an krb5kdc.

BTW There is still posibility to call make with different prefix even thought
configure was called with default prefix
    make clean
    make install prefix=/tmp/usr
    make check_cwrap prefix=/tmp/usr

LS



More information about the sssd-devel mailing list