D14927: KConfig: handle directory symlinks correctly.

2019-02-04 Thread David Faure
dfaure closed this revision.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D14927

To: dfaure, adridg, arichardson, apol
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14927: KConfig: handle directory symlinks correctly.

2019-02-04 Thread Aleix Pol Gonzalez
apol accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R237 KConfig

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D14927

To: dfaure, adridg, arichardson, apol
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14927: KConfig: handle directory symlinks correctly.

2019-02-02 Thread David Faure
dfaure added a comment.


  ping?

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D14927

To: dfaure, adridg, arichardson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14927: KConfig: handle directory symlinks correctly.

2019-01-06 Thread David Faure
dfaure updated this revision to Diff 48823.
dfaure added a comment.


  Improved fix so that testDefaults passes too

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14927?vs=39993=48823

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D14927

AFFECTED FILES
  src/core/kconfig.cpp
  src/core/kconfigini.cpp

To: dfaure, adridg, arichardson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14927: KConfig: handle directory symlinks correctly.

2018-08-21 Thread Adriaan de Groot
adridg added a comment.


  Sorry, this is getting very confusing:
  
  - when running all tests, unpatched: testDelete and testThreads fail
  - when running all tests, patched: testDefaults fails
  
  I suspect there are some more missing canonicalizations, but I don't have 
time right now to go hunting them.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D14927

To: dfaure, adridg, arichardson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14927: KConfig: handle directory symlinks correctly.

2018-08-20 Thread Adriaan de Groot
adridg added a comment.


  Without patch, all tests
  
  
  Totals: 44 passed, 2 failed, 0 skipped, 0 blacklisted, 225ms
  
  The two failed tests are:
  
  - testThreads
  - testDelete
  
  With patch, all tests
  =
  
  Totals: 45 passed, 1 failed, 0 skipped, 0 blacklisted, 229ms
  
  The one failed test is:
  
  - testDefaults
  
  Without patch, some tests
  =
  
  Some tests means run `HOME=/tmp/drop bin/kconfigtest testDelete  testThreads  
testDefaults`
  
* Start testing of KConfigTest *
Config: Using QtTest library 5.10.1, Qt 5.10.1 (x86_64-little_endian-lp64 
shared (dynamic) release build; by Clang 5.0.0 (tags/RELEASE_500/final 312559))
PASS   : KConfigTest::initTestCase()
FAIL!  : KConfigTest::testDelete() '!delgr.exists()' returned FALSE. ()
   Loc: [/home/adridg/src/kde/tier-1/kconfig/autotests/kconfigtest.cpp(802)]
PASS   : KConfigTest::testThreads()
FAIL!  : KConfigTest::testDefaults() Compared values are not the same
   Actual   (group.readEntry("entry1", QString())): "hello"
   Expected (Default) : "Default"
   Loc: [/home/adridg/src/kde/tier-1/kconfig/autotests/kconfigtest.cpp(399)]
PASS   : KConfigTest::cleanupTestCase()
  
  
  
  Without patch, some tests
  =
  
* Start testing of KConfigTest *
Config: Using QtTest library 5.10.1, Qt 5.10.1 (x86_64-little_endian-lp64 
shared (dynamic) release build; by Clang 5.0.0 (tags/RELEASE_500/final 312559))
PASS   : KConfigTest::initTestCase()
PASS   : KConfigTest::testDelete()
FAIL!  : KConfigTest::testThreads() Compared values are not the same
   Actual   (group.readEntry("entry1", QString())): "hello"
   Expected (Default) : "Default"
   Loc: [/zbigone/src/kde/tier-1/kconfig/autotests/kconfigtest.cpp(399)]
PASS   : KConfigTest::testDefaults()
PASS   : KConfigTest::cleanupTestCase()
Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 41ms
* Finished testing of KConfigTest *

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D14927

To: dfaure, adridg, arichardson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14927: KConfig: handle directory symlinks correctly.

2018-08-20 Thread Adriaan de Groot
adridg added a comment.


  This shows up in the unit tests. Whether it has any effect in real life is 
unknown. FreeBSD often -- sometimes, maybe, depending on FS setup and layout -- 
has /home -> /usr/home or /home -> usr/home, and of course there could be weird 
user setups as well where .cache is symlinked to a different location with more 
disk space. In any case, this is triggering unit-test failures in the CI, so 
cleaning it up to consistently compare the same kind of filename is a good 
thing. I'll give this a test on my home system and give a shout when I have.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D14927

To: dfaure, adridg, arichardson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14927: KConfig: handle directory symlinks correctly.

2018-08-19 Thread David Faure
dfaure created this revision.
dfaure added reviewers: adridg, arichardson.
Herald added a project: Frameworks.
Herald edited subscribers, added: kde-frameworks-devel; removed: Frameworks.
dfaure requested review of this revision.

REVISION SUMMARY
  When /home is a symlink, for instance (as is often the case on FreeBSD),
  group deletion would fail because KConfig was comparing non-canonical
  paths with canonical-paths:
  
  QDEBUG : KConfigTest::testDelete() Comparing "/home/adridg/.qttest/config/
  kconfigtest_subdir/kconfigtest" and "/usr/home/adridg/.qttest/config/
  kconfigtest_subdir/kconfigtest"

TEST PLAN
  mkdir /tmp/derp; ln -s /tmp/derp /tmp/drop
  HOME=/tmp/derp bin/kconfigtest testDelete  # Success
  HOME=/tmp/drop bin/kconfigtest testDelete  # Fail

REPOSITORY
  R237 KConfig

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D14927

AFFECTED FILES
  src/core/kconfig.cpp

To: dfaure, adridg, arichardson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns