[SSSD-users] Re: 1.16.2 test failure: sss_nss_idmap-tests
> > Thank you for figuring out the linker option which caused the issue and > for the suggestions. > > I've opened https://pagure.io/SSSD/sssd/issue/3801 to track the issue > and also created https://github.com/SSSD/sssd/pull/632. Thanks. I commented in the PR. The test now passes on Ubuntu with -Wl,-Bsymbolic-functions enabled. \o/ ___ sssd-users mailing list -- sssd-users@lists.fedorahosted.org To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/HPPLNT4Y4JG4UY4OCO3FDFOCRMJTWA2S/
[SSSD-users] Re: 1.16.2 test failure: sss_nss_idmap-tests
On Tue, Aug 07, 2018 at 10:38:59PM +0200, Lukas Slebodnik wrote: > On (07/08/18 15:48), Andreas Hasenack wrote: > >On Tue, Aug 7, 2018 at 10:19 AM Sumit Bose wrote: > >> > >> > But something is still unexplained: the same test works just fine in > >> > debian, and doesn't try to connect to that socket. > >> > >> This is just linker magic. Due to my fault > >> sss_nss_make_request_timeout() is defined twice and which symbol is > >> picked might depend on specific linker options used. > > > >I just found out what option that was. Ubuntu, since many years, uses > >-Wl,-Bsymbolic-functions in its default linker flags. Debian doesn't. > > > >The moment I strip this flag from the build, the test passes. I can't > >do that for the official package build, but it's good to know what > >option was causing the test to fail. > > That would need to be disabled just for make check. > Because libsss_nss_idmap_tests.so which is used for testing is not the same > as libsss_nss_idmap.so which is used in reality. > > libsss_nss_idmap_tests.so also export function sss_nss_make_request_timeout > which is not exported in libsss_nss_idmap.so > > sh-4.4$ nm --defined-only --dynamic .libs/libsss_nss_idmap.so | grep request > sh-4.4$ nm --defined-only --dynamic .libs/libsss_nss_idmap_tests.so | grep > request > 4290 T sss_nss_make_request_timeout > > It was done to make testing possible and avoid copy mistakes > > libsss_nss_idmap_tests_la_SOURCES = $(libsss_nss_idmap_la_SOURCES) > libsss_nss_idmap_tests_la_LIBADD = $(libsss_nss_idmap_la_LIBADD) > libsss_nss_idmap_tests_la_LDFLAGS = \ > $(libsss_nss_idmap_la_LDFLAGS) \ > -shared \ > -rpath $(libdir) \ > > -Wl,--version-script,$(srcdir)/src/sss_client/idmap/sss_nss_idmap.unit_tests > > > Other option would be to "include" all sources from library to test. > + use -Wl,-wrap,sss_nss_make_request_timeout > > > Or another hacky way to use weak symbols Thank you for figuring out the linker option which caused the issue and for the suggestions. I've opened https://pagure.io/SSSD/sssd/issue/3801 to track the issue and also created https://github.com/SSSD/sssd/pull/632. I preferred using -Wl,-wrap to make it more consistent with other tests and hopefully also easier to understand. bye, Sumit > > diff --git a/Makefile.am b/Makefile.am > index ea7648bcd..7216561fb 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -2600,12 +2600,13 @@ test_authtok_LDADD = \ > $(NULL) > > sss_nss_idmap_tests_SOURCES = \ > -src/tests/cmocka/sss_nss_idmap-tests.c > +src/tests/cmocka/sss_nss_idmap-tests.c \ > +$(libsss_nss_idmap_la_SOURCES) > sss_nss_idmap_tests_CFLAGS = \ > $(AM_CFLAGS) > sss_nss_idmap_tests_LDADD = \ > $(CMOCKA_LIBS) \ > -libsss_nss_idmap_tests.la \ > +$(libsss_nss_idmap_la_LIBADD) \ > $(NULL) > > deskprofile_utils_tests_SOURCES = \ > diff --git a/src/sss_client/common.c b/src/sss_client/common.c > index 67a460705..a93aaff16 100644 > --- a/src/sss_client/common.c > +++ b/src/sss_client/common.c > @@ -718,6 +718,7 @@ static enum sss_status sss_cli_check_socket(int *errnop, > > /* this function will check command codes match and returned length is ok */ > /* repbuf and replen report only the data section not the header */ > +__attribute((weak)) > enum nss_status sss_nss_make_request_timeout(enum sss_cli_command cmd, > struct sss_cli_req_data *rd, > int timeout, > > LS > > ___ > sssd-users mailing list -- sssd-users@lists.fedorahosted.org > To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/E2FPZZCLH6YOL2I3FC5R77GFQXZDHRKT/ ___ sssd-users mailing list -- sssd-users@lists.fedorahosted.org To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/LJX5IDXRZDNSQ5U3DJWLVIOZ3DLZE2QA/
[SSSD-users] Re: 1.16.2 test failure: sss_nss_idmap-tests
On Tue, Aug 07, 2018 at 09:36:25AM -0300, Andreas Hasenack wrote: > On Tue, Aug 7, 2018 at 8:04 AM Sumit Bose wrote: > > > > On Mon, Jul 23, 2018 at 10:01:26AM +0200, Jakub Hrozek wrote: > > > Unfortunately these tests don’t have an option to raise the debug level > > > so stepping throught them with gdb is the only option I’m afraid.. > > > > I think I didn't properly mock sss_nss_make_request_timeout() here. > > Instead of the provided call which just mock the results the original > > one is used which tries to talk to SSSD which either does not run or > > does not know about the test user, hence the return code 0x02 (ENOENT). > > > > If you run the test with strace you should see that the test program > > tries to connect to /var/lib/sss/pipes/nss which is not expected. I'll > > try to fix this. > > Indeed it does try that connect a few times: > > 11933 connect(3, {sa_family=AF_UNIX, > sun_path="/var/lib/sss/pipes/nss"}, 110) = -1 ENOENT (No such file or > directory) Thanks for the confirmation. > > But something is still unexplained: the same test works just fine in > debian, and doesn't try to connect to that socket. This is just linker magic. Due to my fault sss_nss_make_request_timeout() is defined twice and which symbol is picked might depend on specific linker options used. bye, Sumit > > I might try updating nss. I have 3.36, and debian has 3.38. > > Thanks! > ___ > sssd-users mailing list -- sssd-users@lists.fedorahosted.org > To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/ZFCUBBCBXO54VBPDU5SLKL2OCWOW5FTL/ ___ sssd-users mailing list -- sssd-users@lists.fedorahosted.org To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/Q43KJ4JATF4RTY62AKEDB2J3757WUDOJ/
[SSSD-users] Re: 1.16.2 test failure: sss_nss_idmap-tests
On Tue, Aug 7, 2018 at 8:04 AM Sumit Bose wrote: > > On Mon, Jul 23, 2018 at 10:01:26AM +0200, Jakub Hrozek wrote: > > Unfortunately these tests don’t have an option to raise the debug level so > > stepping throught them with gdb is the only option I’m afraid.. > > I think I didn't properly mock sss_nss_make_request_timeout() here. > Instead of the provided call which just mock the results the original > one is used which tries to talk to SSSD which either does not run or > does not know about the test user, hence the return code 0x02 (ENOENT). > > If you run the test with strace you should see that the test program > tries to connect to /var/lib/sss/pipes/nss which is not expected. I'll > try to fix this. Indeed it does try that connect a few times: 11933 connect(3, {sa_family=AF_UNIX, sun_path="/var/lib/sss/pipes/nss"}, 110) = -1 ENOENT (No such file or directory) But something is still unexplained: the same test works just fine in debian, and doesn't try to connect to that socket. I might try updating nss. I have 3.36, and debian has 3.38. Thanks! ___ sssd-users mailing list -- sssd-users@lists.fedorahosted.org To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/ZFCUBBCBXO54VBPDU5SLKL2OCWOW5FTL/
[SSSD-users] Re: 1.16.2 test failure: sss_nss_idmap-tests
On Mon, Jul 23, 2018 at 10:01:26AM +0200, Jakub Hrozek wrote: > Unfortunately these tests don’t have an option to raise the debug level so > stepping throught them with gdb is the only option I’m afraid.. I think I didn't properly mock sss_nss_make_request_timeout() here. Instead of the provided call which just mock the results the original one is used which tries to talk to SSSD which either does not run or does not know about the test user, hence the return code 0x02 (ENOENT). If you run the test with strace you should see that the test program tries to connect to /var/lib/sss/pipes/nss which is not expected. I'll try to fix this. bye, Sumit > > > On 20 Jul 2018, at 20:56, Andreas Hasenack wrote: > > > > What I figured out so far is that this is a test that is enabled if > > you have cmocka installed, and this is the first time I had that. > > On Fri, Jul 20, 2018 at 2:22 PM Andreas Hasenack > > wrote: > >> > >> Hi, > >> > >> I'm building 1.16.2 with just > >> https://pagure.io/SSSD/sssd/c/a2cc554f438c220b3cc73eb93879dd87795a86cd?branch=master > >> applied (without it, it doesn't build in Ubuntu currently) and I'm > >> seeing this test failure: > >> > >> [==] Running 2 test(s). > >> [ RUN ] test_getsidbyname > >> [ ERROR ] --- 0x2 != 0 > >> [ LINE ] --- ../src/tests/cmocka/sss_nss_idmap-tests.c:121: error: > >> Failure! > >> [ FAILED ] test_getsidbyname > >> [ RUN ] test_getorigbyname > >> [ ERROR ] --- 0x2 != 0 > >> [ LINE ] --- ../src/tests/cmocka/sss_nss_idmap-tests.c:140: error: > >> Failure! > >> [ FAILED ] test_getorigbyname > >> [==] 2 test(s) run. > >> [ PASSED ] 0 test(s). > >> [ FAILED ] 2 test(s), listed below: > >> [ FAILED ] test_getsidbyname > >> [ FAILED ] test_getorigbyname > >> > >> 2 FAILED TEST(S) > >> FAIL sss_nss_idmap-tests (exit status: 2) > >> > >> I tried with samba 4.7.6 and 4.8.2 installed, and also with > >> --with-smb-idmap-interface-version 5 and 6, same result. Debian is at > >> 1.16.2 and the tests pass there just fine, so I think I'm looking at > >> some dependency problem. > >> ldb is 1.3.1 > >> tdb is 1.3.15 > >> > >> Any pointers? Maybe a way to run just that test, so I can add > >> debugging statements? > >> > >> Thanks! > > ___ > > sssd-users mailing list -- sssd-users@lists.fedorahosted.org > > To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org > > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > > List Archives: > > https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/UB32RZUSGRALDIPPDUSJIT6CSTCSM3F6/ > ___ > sssd-users mailing list -- sssd-users@lists.fedorahosted.org > To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/J2ZV2J3CFB64BH7SGYR5TB432CIZVF3K/ ___ sssd-users mailing list -- sssd-users@lists.fedorahosted.org To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/Q723VETJCXBCA52ORIOM4EHFVOFGQIO5/
[SSSD-users] Re: 1.16.2 test failure: sss_nss_idmap-tests
Unfortunately these tests don’t have an option to raise the debug level so stepping throught them with gdb is the only option I’m afraid.. > On 20 Jul 2018, at 20:56, Andreas Hasenack wrote: > > What I figured out so far is that this is a test that is enabled if > you have cmocka installed, and this is the first time I had that. > On Fri, Jul 20, 2018 at 2:22 PM Andreas Hasenack > wrote: >> >> Hi, >> >> I'm building 1.16.2 with just >> https://pagure.io/SSSD/sssd/c/a2cc554f438c220b3cc73eb93879dd87795a86cd?branch=master >> applied (without it, it doesn't build in Ubuntu currently) and I'm >> seeing this test failure: >> >> [==] Running 2 test(s). >> [ RUN ] test_getsidbyname >> [ ERROR ] --- 0x2 != 0 >> [ LINE ] --- ../src/tests/cmocka/sss_nss_idmap-tests.c:121: error: >> Failure! >> [ FAILED ] test_getsidbyname >> [ RUN ] test_getorigbyname >> [ ERROR ] --- 0x2 != 0 >> [ LINE ] --- ../src/tests/cmocka/sss_nss_idmap-tests.c:140: error: >> Failure! >> [ FAILED ] test_getorigbyname >> [==] 2 test(s) run. >> [ PASSED ] 0 test(s). >> [ FAILED ] 2 test(s), listed below: >> [ FAILED ] test_getsidbyname >> [ FAILED ] test_getorigbyname >> >> 2 FAILED TEST(S) >> FAIL sss_nss_idmap-tests (exit status: 2) >> >> I tried with samba 4.7.6 and 4.8.2 installed, and also with >> --with-smb-idmap-interface-version 5 and 6, same result. Debian is at >> 1.16.2 and the tests pass there just fine, so I think I'm looking at >> some dependency problem. >> ldb is 1.3.1 >> tdb is 1.3.15 >> >> Any pointers? Maybe a way to run just that test, so I can add >> debugging statements? >> >> Thanks! > ___ > sssd-users mailing list -- sssd-users@lists.fedorahosted.org > To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/UB32RZUSGRALDIPPDUSJIT6CSTCSM3F6/ ___ sssd-users mailing list -- sssd-users@lists.fedorahosted.org To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/J2ZV2J3CFB64BH7SGYR5TB432CIZVF3K/
[SSSD-users] Re: 1.16.2 test failure: sss_nss_idmap-tests
What I figured out so far is that this is a test that is enabled if you have cmocka installed, and this is the first time I had that. On Fri, Jul 20, 2018 at 2:22 PM Andreas Hasenack wrote: > > Hi, > > I'm building 1.16.2 with just > https://pagure.io/SSSD/sssd/c/a2cc554f438c220b3cc73eb93879dd87795a86cd?branch=master > applied (without it, it doesn't build in Ubuntu currently) and I'm > seeing this test failure: > > [==] Running 2 test(s). > [ RUN ] test_getsidbyname > [ ERROR ] --- 0x2 != 0 > [ LINE ] --- ../src/tests/cmocka/sss_nss_idmap-tests.c:121: error: > Failure! > [ FAILED ] test_getsidbyname > [ RUN ] test_getorigbyname > [ ERROR ] --- 0x2 != 0 > [ LINE ] --- ../src/tests/cmocka/sss_nss_idmap-tests.c:140: error: > Failure! > [ FAILED ] test_getorigbyname > [==] 2 test(s) run. > [ PASSED ] 0 test(s). > [ FAILED ] 2 test(s), listed below: > [ FAILED ] test_getsidbyname > [ FAILED ] test_getorigbyname > > 2 FAILED TEST(S) > FAIL sss_nss_idmap-tests (exit status: 2) > > I tried with samba 4.7.6 and 4.8.2 installed, and also with > --with-smb-idmap-interface-version 5 and 6, same result. Debian is at > 1.16.2 and the tests pass there just fine, so I think I'm looking at > some dependency problem. > ldb is 1.3.1 > tdb is 1.3.15 > > Any pointers? Maybe a way to run just that test, so I can add > debugging statements? > > Thanks! ___ sssd-users mailing list -- sssd-users@lists.fedorahosted.org To unsubscribe send an email to sssd-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/sssd-users@lists.fedorahosted.org/message/UB32RZUSGRALDIPPDUSJIT6CSTCSM3F6/