On (30/05/14 10:51), Jakub Hrozek wrote:
Hi,
the attached patch fixes
https://fedorahosted.org/sssd/ticket/2291
To test, log in as an sssd user and run:
make distcheck
Before the patch, the sbus test would fail with a strange error message
such as:
Could not get password database information for UID of current
process: User "???" unknown or no memory to allocate password entry
The patch disables the sbus_tests and sbus_codegen tests when running
distcheck. The tests are still built and ran as appropriate when running
"make check".
From 757f3edaae343cb55f9aa2355d8e2376d57e4420 Mon Sep 17 00:00:00
2001
From: Jakub Hrozek <jhrozek(a)redhat.com>
Date: Fri, 30 May 2014 10:33:43 +0200
Subject: [PATCH] BUILD: Disable dbus tests when running distcheck
https://fedorahosted.org/sssd/ticket/2291
The dbus tests that mock an sbus server were failing when make distcheck
was ran by a user logged in through the SSSD.
The reason was that the libtool wrapper around the test library alters
the LD_LIBRARY_PATH and as a consequence, the standard getpwuid_r() calls
the dbus server performs would load the in-tree NSS library and not the
system one. The-in tree library would then attempt to talk to an in-tree
NSS socket, fail, which would fail the getpwuid_r call with an error such as:
"""
Could not get password database information for UID of current process:
User "???" unknown or no memory to allocate password entry
"""
This patch adds a new configure-time option called --enable-dbus-tests
that is enabled by default and disabled during distcheck. When the
option is disabled, the tests that require a mocked dbus server are not
compiled at all.
---
Makefile.am | 17 +++++++++++++----
src/conf_macros.m4 | 7 +++++++
2 files changed, 20 insertions(+), 4 deletions(-)
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -667,3 +667,10 @@ AC_DEFUN([WITH_SAMBA],
fi
AM_CONDITIONAL([BUILD_SAMBA], [test x"$with_samba" = xyes])
])
+
+AC_ARG_ENABLE([dbus-tests],
+ [AS_HELP_STRING([--enable-dbus-tests],
+ [enable running tests using a dbus server
instance [default=enabled]])],
^^^^^^^^^^^^^^^
default is yes
The help string will be consistent with other options.
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
+ [build_dbus_tests=$enableval],
+ [build_dbus_tests=yes])
+AM_CONDITIONAL([BUILD_DBUS_TESTS], [test x$build_dbus_tests = xyes])
--
1.9.0
Otherwise, patch works fine.
LS