summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdir/tst_qdir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qdir/tst_qdir.cpp')
-rw-r--r--tests/auto/qdir/tst_qdir.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp
index 1fd5e88..e5b23ab 100644
--- a/tests/auto/qdir/tst_qdir.cpp
+++ b/tests/auto/qdir/tst_qdir.cpp
@@ -571,10 +571,21 @@ void tst_QDir::entryList()
return;
}
- for (int i=0; i<max; ++i)
- QCOMPARE(actual[i], expected[i]);
+ bool doContentCheck = true;
+#ifdef Q_OS_UNIX
+ if (qstrcmp(QTest::currentDataTag(), "QDir::AllEntries | QDir::Writable") == 0) {
+ // for root, everything is writeable
+ if (::getuid() == 0)
+ doContentCheck = false;
+ }
+#endif
- QCOMPARE(actual.count(), expected.count());
+ if (doContentCheck) {
+ for (int i=0; i<max; ++i)
+ QCOMPARE(actual[i], expected[i]);
+
+ QCOMPARE(actual.count(), expected.count());
+ }
QFile::remove(SRCDIR "entrylist/writable");
QFile::remove(SRCDIR "entrylist/linktofile");