On Fri, 2013-09-06 at 15:27 +0200, Lukas Slebodnik wrote:
This version works well.
I tried to remove some files from library:
diff
------------------
@@ -1366,7 +1366,6 @@ endif
nsslib_LTLIBRARIES = libnss_sss.la
libnss_sss_la_SOURCES = \
- src/sss_client/common.c \
src/sss_client/nss_passwd.c \
src/sss_client/nss_group.c \
src/sss_client/nss_netgroup.c \
And test failed.
Running suite(s): dlopen
0%: Checks: 1, Failures: 1, Errors: 0
../sssd/src/tests/dlopen-tests.c:74:F:dlopen:test_dlopen_base:0:
dlopen() failed for ./.libs/libnss_sss.so:
[./.libs/libnss_sss.so: undefined symbol: sss_nss_lock]
Then I tried to remove another file.
@@ -1374,8 +1374,6 @@ libnss_sss_la_SOURCES = \
src/sss_client/sss_cli.h \
src/sss_client/nss_compat.h \
src/sss_client/nss_mc_common.c \
- src/util/io.c \
src/util/murmurhash3.c \
src/sss_client/nss_mc_passwd.c \
src/sss_client/nss_mc_group.c \
src/sss_client/nss_mc.h
And test did not fail. I don't know why, because this missing file
caused crash in past.
https://fedorahosted.org/sssd/ticket/1838
Ok the reason why the second issue was not caught is that in the
original patch I had to link in a bunch of binaries for the provider
module case, and those contained the symbol you tried to test.
I have a new patch attached, that spins off the symbols needed by the
provider modules in their own .so library, so that we load the library
only when testing the provider modules but not for other libraries.
Now libnss_sss.so fails the dlopen-tests when the io.c file is omitted.
2 points on the new code:
* I had to add libdlopen_test_providers to lib_LTLIBRARY instead of
noinst_LTLIBRARY or check_LTLIBRARY because with these last 2 targets
libtool never builds .so files :-/
Therefore I had to add an intsall-exec-hook to remove
libdlopen_test_providers.so file at install time, as we use it only for
testing.
* I am not sure why libsss_child.so, libsss_crypt.so, libsss_util.so
need some libraries to be explicitly loaded instead of having them
encoded as their dependencies, might be a bug in our makefile. If it is
I think we should still commit this patch as is and then open a bug to
resolve the issue and adjust the test in the same commit the resolve the
issue.
Simo.
--
Simo Sorce * Red Hat, Inc * New York