[Libreoffice-commits] core.git: xmlsecurity/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 15 16:47:35 UTC 2018
xmlsecurity/qa/unit/signing/signing.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit ac37f40464a6bce346e588b3979bf97809f18f27
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 15 14:12:27 2018 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 15 17:47:04 2018 +0100
Adapt recent CppunitTest_xmlsecurity_signing fix to ASan
f0305ec0a7d199e605511844d9d6af98b66d4bfd "Fix creation/removal of GPG socketdir"
spawns additional gpgconf processes which need the same LD_LIBRARY_PATH fix as
d15f042abd5a1093984a0c8380837145f38c4efc "CppunitTest_xmlsecurity_signing failed
in sanitizer builds"
Change-Id: I1da9e9e459c5a584f092966923f8818f115322dc
Reviewed-on: https://gerrit.libreoffice.org/63420
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 15553c922934..e6054c5f6129 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -196,6 +196,9 @@ void SigningTest::setUp()
osl_setEnvironment(gpgHomeVar.pData, aTargetPath.pData);
#if HAVE_GPGCONF_SOCKETDIR
+ auto const ldPath = std::getenv("LIBO_LD_PATH");
+ m_gpgconfCommandPrefix
+ = ldPath == nullptr ? OString() : OStringLiteral("LD_LIBRARY_PATH=") + ldPath + " ";
OString path;
bool ok = aTargetPath.convertToString(&path, osl_getThreadTextEncoding(),
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
@@ -203,9 +206,10 @@ void SigningTest::setUp()
// if conversion fails, at least provide a best-effort conversion in the message here, for
// context
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(aTargetPath, RTL_TEXTENCODING_UTF8).getStr(), ok);
- m_gpgconfCommandPrefix = "GNUPGHOME=" + path + " " GPGME_GPGCONF;
+ m_gpgconfCommandPrefix += "GNUPGHOME=" + path + " " GPGME_GPGCONF;
// HAVE_GPGCONF_SOCKETDIR is only defined in configure.ac for Linux for now, so (a) std::system
- // behavior will conform to POSIX, and (b) gpgconf --create-socketdir should return zero:
+ // behavior will conform to POSIX (and the relevant env var to setis named LD_LIBRARY_PATH), and
+ // (b) gpgconf --create-socketdir should return zero:
OString cmd = m_gpgconfCommandPrefix + " --create-socketdir";
int res = std::system(cmd.getStr());
CPPUNIT_ASSERT_EQUAL_MESSAGE(cmd.getStr(), 0, res);
More information about the Libreoffice-commits
mailing list