[SSSD] [PATCH 1/1] tests: Don't assume absolute test dir in test_io.c

Nikolai Kondrashov Nikolai.Kondrashov at redhat.com
Wed Apr 16 16:13:54 UTC 2014


On 04/16/2014 06:27 PM, Lukas Slebodnik wrote:
> On (16/04/14 17:54), Nikolai Kondrashov wrote:
>> On 04/16/2014 05:44 PM, Lukas Slebodnik wrote:
>>> On (16/04/14 16:21), Nikolai Kondrashov wrote:
>>>> On 04/16/2014 04:03 PM, Lukas Slebodnik wrote:
>>>>>>
>>>>>> Agreed.
>>>>>> However, the problem lies entirely in the test, and I'm trying to solve it.
>>>>>>
>>>>>> The test first changes into TEST_DIR, then tries to open TEST_DIR.
>>>>>> This wouldn't work with a relative path such as "test-dir", as there is not
>>>>>> likely to be "test-dir" within "test-dir".
>>>>>>
>>>>>> It also tries to create a temporary file in TEST_DIR, while already being in
>>>>>> TEST_DIR. This also doesn't work with "test-dir", for the same reason.
>>>>>
>>>>> test_io is simple unit test and it does not worth to refactor this test.
>>>>
>>>> Sure, but I'm not suggesting we should refactor it. The proposed patch fixes
>>>> the problem in its entirety.
>>>>
>>>>> It works if $TEST_DIR is created.
>>>>
>>>> Not always. Not when the path is relative (and not "."). Please execute this
>>>> and see for yourself:
>>>>
>>>>     mkdir test-dir
>>>>     ./configure --with-test-dir=test-dir
>>> 1. It is not recommended to run configure from source directory.
>>>
>>>>     make check
>>> 2. It will fail, but You do not know purpose of argument --with-test-dir
>>>     It is not docummented.
>>>
>>> The configure argument "with-test-dir" was created because sysdb test are slow
>>> on HDD. In my case, It takes 14 minutes (IIRC)
>>> If you want to speed up tests you will need run test in ramdisk(/dev/shm)
>>> and you will specify full path to ramdisk.
>>
>> I don't want to run them on ramdisk. I want to keep the results in separate
>> directories from separate runs and archive them. Also, on one run the
>> performance will be swamped by valgrind anyway, and another will be impaired
>> by coverage data output.

Lukas, did you want to reply?



More information about the sssd-devel mailing list