On (16/04/14 21:30), Nikolai Kondrashov wrote:
Hi Lukas,
A slightly more complete answer to your last message.
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:
>>>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.
I gathered as much. It should work though and I made it this way to have
instructions clearer.
>> make check
>2. It will fail, but You do not know purpose of argument --with-test-dir
> It is not docummented.
I knew the purpose of --with-test-dir when making this patch, and its function
is documented clear enough in src/conf_macros.m4 and "./configure --help"
output. It says: "Directory used for make check temporary files".
Nowhere it does say: "don't supply relative paths, because they don't
work."
Even if it wasn't documented, the straightforward "directory for temporary
files" is still easier to remember than "directory for temporary files, but
not pointed by a relative path, or a test will break".
This tiny patch doesn't make the code more complicated, but instead slightly
*less* complicated and prevents confusion in the future.
>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.
In my case there is no beneficial performance difference when running with
valgrind. There is about 25% improvement using /dev/shm when running with
coverage enabled, but even in a VM it takes less than a minute on my machine.
I was waiting for pshing patch to the upstream.
This is a reason of late reply.
I will use /dev/shm and will mess with moving test results around,
when/if
I'll need to tune the performance, but for now I'd prefer to keep my CI code
simple and use relative directories.
I have totally different results. The most problematic is sysdb test,
because there is a lof of IO operations.
[user@host][/dev/shm/sssd_build]$time ./sysdb-tests
Warning: LDB_MODULES_PATH is not set, will use LDB plugins installed in system paths.
Running suite(s): sysdb
100%: Checks: 807, Failures: 0, Errors: 0
real 0m0.747s
user 0m0.551s
sys 0m0.187s
[user@host][/dev/shm/sssd_build]$time libtool --mode=execute valgrind ./sysdb-tests
==18119== Memcheck, a memory error detector
==18119== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==18119== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==18119== Command: /dev/shm/sssd_build/.libs/lt-sysdb-tests
==18119==
//snip
real 0m32.283s
user 0m28.058s
sys 0m0.856s
[user@host][/var/tmp/sssd_build]$time ./sysdb-tests
Warning: LDB_MODULES_PATH is not set, will use LDB plugins installed in system paths.
Running suite(s): sysdb
100%: Checks: 807, Failures: 0, Errors: 0
real 7m59.268s
user 0m3.054s
sys 0m3.995s
[user@host][/var/tmp/sssd_build]$time libtool --mode=execute valgrind ./sysdb-tests
==18253== Memcheck, a memory error detector
==18253== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==18253== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==18253== Command: /var/tmp/sssd_build/.libs/lt-sysdb-tests
==18253==
//snip
real 8m47.860s
user 1m13.385s
sys 0m5.411s
Sumarry
=======================================
ramdisk ........ 0.8 sec 1x
ramdisk + valgrind ........ 32.2 sec 40x
hdd ........ 479.2 sec 599x
hdd + valgrind ........ 527.8 sec 659x
"ramdisk + valgrind" is 16 times faster than "hdd + valgrind"
"ramdisk" is 600 times faster then "hdd"
LS