#8437 unit tests for ipa-extdom-extop are failing in Fedora 33
Closed: fixed 3 years ago by rcritten. Opened 3 years ago by abbra.

https://kojipkgs.fedoraproject.org//work/tasks/4956/48154956/build.log

make[3]: Entering directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
make  extdom_cmocka_tests
make[4]: Entering directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
gcc -DHAVE_CONFIG_H -I. -I../../..  -I. -I./../common -DPREFIX=\""/usr"\" -DBINDIR=\""/usr/bin"\" -DLIBDIR=\""/usr/lib64"\" -DLIBEXECDIR=\""/usr/libexec"\" -DDATADIR=\""/usr/share"\" -DUSE_OPENLDAP -I/usr/include/dirsrv  -I/usr/include/nspr4        -O2 -flto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D__STDC_WANT_LIB_EXT1__=1 -D_DEFAULT_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Werror=implicit-function-declaration -c -o extdom_cmocka_tests-ipa_extdom_cmocka_tests.o `test -f 'ipa_extdom_cmocka_tests.c' || echo './'`ipa_extdom_cmocka_tests.c
gcc -DHAVE_CONFIG_H -I. -I../../..  -I. -I./../common -DPREFIX=\""/usr"\" -DBINDIR=\""/usr/bin"\" -DLIBDIR=\""/usr/lib64"\" -DLIBEXECDIR=\""/usr/libexec"\" -DDATADIR=\""/usr/share"\" -DUSE_OPENLDAP -I/usr/include/dirsrv  -I/usr/include/nspr4        -O2 -flto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D__STDC_WANT_LIB_EXT1__=1 -D_DEFAULT_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Werror=implicit-function-declaration -c -o extdom_cmocka_tests-ipa_extdom_common.o `test -f 'ipa_extdom_common.c' || echo './'`ipa_extdom_common.c
gcc -DHAVE_CONFIG_H -I. -I../../..  -I. -I./../common -DPREFIX=\""/usr"\" -DBINDIR=\""/usr/bin"\" -DLIBDIR=\""/usr/lib64"\" -DLIBEXECDIR=\""/usr/libexec"\" -DDATADIR=\""/usr/share"\" -DUSE_OPENLDAP -I/usr/include/dirsrv  -I/usr/include/nspr4        -O2 -flto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D__STDC_WANT_LIB_EXT1__=1 -D_DEFAULT_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Werror=implicit-function-declaration -c -o extdom_cmocka_tests-back_extdom_nss_sss.o `test -f 'back_extdom_nss_sss.c' || echo './'`back_extdom_nss_sss.c
/bin/sh ../../../libtool  --tag=CC   --mode=link gcc  -O2 -flto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D__STDC_WANT_LIB_EXT1__=1 -D_DEFAULT_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Werror=implicit-function-declaration -rpath /usr/lib64/dirsrv   -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o extdom_cmocka_tests extdom_cmocka_tests-ipa_extdom_cmocka_tests.o extdom_cmocka_tests-ipa_extdom_common.o extdom_cmocka_tests-back_extdom_nss_sss.o  -lcmocka  -lldap_r -llber -L/usr/lib64/dirsrv -lslapd  -lsss_nss_idmap  -ldl  
libtool: link: gcc -O2 -flto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D__STDC_WANT_LIB_EXT1__=1 -D_DEFAULT_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Werror=implicit-function-declaration -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o extdom_cmocka_tests extdom_cmocka_tests-ipa_extdom_cmocka_tests.o extdom_cmocka_tests-ipa_extdom_common.o extdom_cmocka_tests-back_extdom_nss_sss.o  -lcmocka -lldap_r -llber -L/usr/lib64/dirsrv -lslapd -lsss_nss_idmap -ldl -Wl,-rpath -Wl,/usr/lib64/dirsrv
make[4]: Leaving directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
make  check-TESTS
make[4]: Entering directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
make[5]: Entering directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
FAIL: extdom_cmocka_tests
==============================================================================
   freeipa 4.8.7: daemons/ipa-slapi-plugins/ipa-extdom-extop/test-suite.log
==============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: extdom_cmocka_tests
=========================
[==========] Running 9 test(s).
[ RUN      ] test_pack_ber_user_timeout
[       OK ] test_pack_ber_user_timeout
[ RUN      ] test_getpwnam_r_wrapper
[  ERROR   ] --- 0x2 != 0
[   LINE   ] --- ipa_extdom_cmocka_tests.c:195: error: Failure!
[  FAILED  ] test_getpwnam_r_wrapper
[ RUN      ] test_getpwuid_r_wrapper
[  ERROR   ] --- 0x2 != 0
[   LINE   ] --- ipa_extdom_cmocka_tests.c:249: error: Failure!
[  FAILED  ] test_getpwuid_r_wrapper
[ RUN      ] test_getgrnam_r_wrapper
[  ERROR   ] --- 0x2 != 0
[   LINE   ] --- ipa_extdom_cmocka_tests.c:302: error: Failure!
[  FAILED  ] test_getgrnam_r_wrapper
[ RUN      ] test_getgrgid_r_wrapper
[  ERROR   ] --- 0x2 != 0
[   LINE   ] --- ipa_extdom_cmocka_tests.c:351: error: Failure!
[  FAILED  ] test_getgrgid_r_wrapper
[ RUN      ] test_get_user_grouplist
[  ERROR   ] --- 0x1 != 0x3
[   LINE   ] --- ipa_extdom_cmocka_tests.c:405: error: Failure!
[  FAILED  ] test_get_user_grouplist
[ RUN      ] test_set_err_msg
[       OK ] test_set_err_msg
[ RUN      ] test_encode
[       OK ] test_encode
[ RUN      ] test_decode
[       OK ] test_decode
[==========] 9 test(s) run.
[  PASSED  ] 4 test(s).
[  FAILED  ] 5 test(s), listed below:
[  FAILED  ] test_getpwnam_r_wrapper
[  FAILED  ] test_getpwuid_r_wrapper
[  FAILED  ] test_getgrnam_r_wrapper
[  FAILED  ] test_getgrgid_r_wrapper
[  FAILED  ] test_get_user_grouplist
 5 FAILED TEST(S)
FAIL extdom_cmocka_tests (exit status: 5)
============================================================================
Testsuite summary for freeipa 4.8.7
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See daemons/ipa-slapi-plugins/ipa-extdom-extop/test-suite.log
Please report to https://hosted.fedoraproject.org/projects/freeipa/newticket
============================================================================
make[5]: Leaving directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
make[4]: Leaving directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
make[3]: Leaving directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins/ipa-extdom-extop'
make[2]: Leaving directory '/builddir/build/BUILD/freeipa-4.8.7/daemons/ipa-slapi-plugins'
make[5]: *** [Makefile:983: test-suite.log] Error 1
make[4]: *** [Makefile:1091: check-TESTS] Error 2
make[3]: *** [Makefile:1165: check-am] Error 2
make[2]: *** [Makefile:491: check-recursive] Error 1
make[1]: *** [Makefile:485: check-recursive] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/freeipa-4.8.7/daemons'
make: *** [Makefile:679: check-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.zyEsUR (%check)
    Bad exit status from /var/tmp/rpm-tmp.zyEsUR (%check)
RPM build errors:
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/util.py", line 776, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/freeipa.spec

I cannot reproduce it with 2.31.9000-19.fc33 but the difference between this build and the -20.fc33 and later ones is that they merge some code optimizations in nss_files and IO processing in glibc git master that make our use of 'fopen' override in the ipa-extdom-extop test code inefficient. We already knew that a constructor trying to override fopen call might race with other shared modules. It looks like we should replace this method of overriding /etc/passwd and /etc/group access in the test with use of a mount namespace.

Effectively, what matters is that we dynamically load nss_files.so.2 and then the latter opens our user and group information instead of the system one. These days this can be achieved with a chroot or namespace operation.

master:

  • 3a42bc0 extdom-extop: refactor tests to use unshare+chroot to override nss_files configuration

ipa-4-8:

  • 96aa09b extdom-extop: refactor tests to use unshare+chroot to override nss_files configuration

Metadata Update from @rcritten:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata