c106bfdf2ee6cfdfb76578b93523d054af2a3a99 |
|
18-Sep-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
tests: Move test_dom_suite_setup to different module
The function test_dom_suite_setup is a simple function which creates
a directory which should be used for creating files. This function
needn't be linked with libsss_util.so as other functions in common_dom.c
This is a reason why it's better to move it to the file common.c
so linker can optimize out other unnecessary module objects from static
library libsss_test_common.a and test needn't be linked libsss_util.so.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
9a0255c508ede92423a1f8a02c6c38328482c55f |
|
02-May-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Default TEST_DIR to cwd, not empty string if not set explicitly
If configure isn't being run with argument --with-test-dir, then variable
TEST_DIR will be defined, but its value will be empty (""). In this case
opendir will fail with uncatched error "Directory does not exist, or name is
an empty string". Finally function call dirfd will segfault because its
argument is NULL.
I changed default value of TEST_DIR (if --with-test-dir was not used).
Function tests_set_cwd does not ignore return value of chdir, because
TEST_DIR should not be the empty string. |