summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile/tst_qfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qfile/tst_qfile.cpp')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index cca4655f58..42dca7fc66 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1193,6 +1193,13 @@ void tst_QFile::permissions()
if (qt_ntfs_permission_lookup)
QEXPECT_FAIL("readonly", "QTBUG-25630", Abort);
#endif
+#ifdef Q_OS_UNIX
+ if (strcmp(QTest::currentDataTag(), "readonly") == 0) {
+ // in case accidentally run as root
+ if (::getuid() == 0)
+ QSKIP("Running this test as root doesn't make sense");
+ }
+#endif
QCOMPARE((memberResult == QFile::Permissions(perms)), expected);
QCOMPARE((staticResult == QFile::Permissions(perms)), expected);
}