[SSSD] [PATCH 1/1] build: List test extensions

Nikolai Kondrashov Nikolai.Kondrashov at redhat.com
Tue Apr 22 18:25:11 UTC 2014


Hi Jakub,

On 04/22/2014 06:28 PM, Jakub Hrozek wrote:
> On Fri, Apr 18, 2014 at 03:18:29PM +0300, Nikolai Kondrashov wrote:
>> Hi everyone,
>>
>> This will let us skip running Python tests under Valgrind, as they produce too
>> many interpreter-specific errors, which are hard to suppress.
>>
>> Sincerely,
>> Nick
>
> Nick, a word of warning about running our tests in valgrind (and maybe
> you already know)..

Thanks for the warnings and hints, Jakub!

> We use two test frameworks in sssd -- earlier, we used to prefer
> 'check', but newer unit tests are written with 'cmocka'.

Yes, I noticed this.

> check-based unit tests execute each test case in a separate process to
> avoid crashing the whole unit test if a single test case crashes, so
> valgrind wouldn't be usable out-of-the-box. You'd have to export
> CK_FORK='no' to make the unit test run in a single thread.

Yes, I've seen that, but for now resorted to enabling Valgrind's children
tracking, which seems to work.

> cmocka-based tests run in a single process and do some longjmp magic to
> avoid forking.

I didn't know about cmocka using longjmp. However, I've seen longjmp use in
another test framework before.

> For both kinds of tests, I also typically work around libtool by running
> the test with:
>       libtool --mode=execute valgrind $unit_test

Yes I'm trying to work this around currently, while also trying to preserve
and use the build system as much as possible, so we can use "make check".
Not sure if there is an easy way out of this, though.

Sincerely,
Nick



More information about the sssd-devel mailing list