D28472: [DirectorySizeJob] Fix sub-dirs count when resolving symlinks to dirs
David Faure
noreply at phabricator.kde.org
Sun Apr 5 19:30:42 BST 2020
dfaure added a comment.
Does the test pass for you now?
For me it fails (and it fails on FreeBSD CI too https://build.kde.org/job/Frameworks/job/kio/job/kf5-qt5%20FreeBSDQt5.14/37/testReport/junit/projectroot/autotests/kiocore_jobtest/)
FAIL! : JobTest::directorySize() Compared values are not the same
Actual (job->totalSubdirs()): 3
Expected (4ULL) : 4
Loc: [/d/kde/src/5/frameworks/kio/autotests/jobtest.cpp(1133)]
What's happening is
QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries subdir "dirFromHome" => 1
QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries Skip visited inode "dirFromHome_link"
QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries subdir "dirFromHome_copied" => 2
QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries subdir "dirFromHome_copied/dirFromHome" => 3
http://www.davidfaure.fr/2020/debug.diff
I think the problem is that order is undefined. If the symlink is seen first, both will be counted (your if() is only around the insert). If it's seen second, it'll be skipped.
I think we should skip the whole visitedInodes thing for symlinks, not just the insert.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D28472
To: ahmadsamir, #frameworks, dfaure, meven
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200405/d1ee2183/attachment.html>
More information about the Kde-frameworks-devel
mailing list