<table><tr><td style="">dfaure added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D28472">View Revision</a></tr></table><br /><div><div><p>Does the test pass for you now?</p>
<p>For me it fails (and it fails on FreeBSD CI too <a href="https://build.kde.org/job/Frameworks/job/kio/job/kf5-qt5%20FreeBSDQt5.14/37/testReport/junit/projectroot/autotests/kiocore_jobtest/" class="remarkup-link" target="_blank" rel="noreferrer">https://build.kde.org/job/Frameworks/job/kio/job/kf5-qt5%20FreeBSDQt5.14/37/testReport/junit/projectroot/autotests/kiocore_jobtest/</a>)</p>
<p>FAIL! : JobTest::directorySize() Compared values are not the same</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">Actual (job->totalSubdirs()): 3
Expected (4ULL) : 4
Loc: [/d/kde/src/5/frameworks/kio/autotests/jobtest.cpp(1133)]</pre></div>
<p>What's happening is</p>
<p>QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries subdir "dirFromHome" => 1<br />
QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries Skip visited inode "dirFromHome_link"<br />
QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries subdir "dirFromHome_copied" => 2<br />
QDEBUG : JobTest::directorySize() KIO::DirectorySizeJobPrivate::slotEntries subdir "dirFromHome_copied/dirFromHome" => 3</p>
<p><a href="http://www.davidfaure.fr/2020/debug.diff" class="remarkup-link" target="_blank" rel="noreferrer">http://www.davidfaure.fr/2020/debug.diff</a></p>
<p>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.</p>
<p>I think we should skip the whole visitedInodes thing for symlinks, not just the insert.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28472">https://phabricator.kde.org/D28472</a></div></div><br /><div><strong>To: </strong>ahmadsamir, Frameworks, dfaure, meven<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns<br /></div>