[Libreoffice-commits] core.git: sal/qa

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 7 10:19:14 UTC 2020


 sal/qa/osl/security/osl_Security.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 8bf24518fcd6fab000edf193e0591b9bf0b9c152
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Dec 7 09:51:59 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Dec 7 11:18:30 2020 +0100

    Revert "Fix osl_Security::getHomeDir test under fakeroot"
    
    This reverts commit c8098382da6a7a0448ff8051cac467f91d7e0b36.
    Conflicts:
            sal/qa/osl/security/osl_Security.cxx
    
    There should be no good reason to run unit tests like
    CppunitTest_sal_osl_security under fakeroot, esp. not since
    a58e086ededb8442938e81f971dfae36ef7eb076 "rework the default make target" no
    longer runs them as part of a plain `make`.  (And getting rid of this code means
    one less place to audit for nullptr issues with getenv in combination with
    potential OString -> std::string_view changes.)
    
    Change-Id: I6bba0ed28ea1ba894ee182f8bda35aad69a54dc6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107336
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index b5e46ee3eccd..b0b741d6cfe0 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -346,11 +346,8 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
     strUserName = OUString::createFromAscii( pw->pw_name );
 
     /// get home directory;
-    char *pw_dir = pw->pw_dir;
-    if( getenv( "FAKEROOTKEY" ) )
-        pw_dir = getenv("HOME");
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "#Convert from system path to URL failed.",
-                            ::osl::File::E_None, ::osl::File::getFileURLFromSystemPath( OUString::createFromAscii( pw_dir ), strHomeDirectory ) );
+                            ::osl::File::E_None, ::osl::File::getFileURLFromSystemPath( OUString::createFromAscii( pw->pw_dir ), strHomeDirectory ) );
 
     /// get config directory;
     strConfigDirectory = strHomeDirectory.copy(0);


More information about the Libreoffice-commits mailing list