summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsettings
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-07-21 11:19:49 (GMT)
committerHarald Fernengel <harald@trolltech.com>2009-07-21 11:20:03 (GMT)
commit31e358f2290c145b839fc5b7b277922c1ab6e19b (patch)
tree6569829854abd6c2011f740c3d91f6fe9e890836 /tests/auto/qsettings
parent2db22b1b12cc7579d08a83ad889efe7f8f07c843 (diff)
downloadQt-31e358f2290c145b839fc5b7b277922c1ab6e19b.zip
Qt-31e358f2290c145b839fc5b7b277922c1ab6e19b.tar.gz
Qt-31e358f2290c145b839fc5b7b277922c1ab6e19b.tar.bz2
fix tests for QT_NO_PROCESS and when running tests as root
Diffstat (limited to 'tests/auto/qsettings')
-rw-r--r--tests/auto/qsettings/tst_qsettings.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/qsettings/tst_qsettings.cpp b/tests/auto/qsettings/tst_qsettings.cpp
index 77fef1f..5b9e9e1 100644
--- a/tests/auto/qsettings/tst_qsettings.cpp
+++ b/tests/auto/qsettings/tst_qsettings.cpp
@@ -716,6 +716,9 @@ void tst_QSettings::testErrorHandling()
#ifdef QT_BUILD_INTERNAL
#ifdef Q_OS_WIN
QSKIP("Windows doesn't support most file modes, including read-only directories, so this test is moot.", SkipAll);
+#elif defined(Q_OS_UNIX)
+ if (::getuid() == 0)
+ QSKIP("Running this test as root doesn't work, since file perms do not bother him", SkipAll);
#else
QFETCH(int, filePerms);
QFETCH(int, dirPerms);
@@ -724,8 +727,7 @@ void tst_QSettings::testErrorHandling()
QFETCH(int, statusAfterGet);
QFETCH(int, statusAfterSetAndSync);
-
- system(QString("chmod 700 %1 2>/dev/null").arg(settingsPath("someDir")).toLatin1());
+ system(QString("chmod 700 %1 2>/dev/null").arg(settingsPath("someDir")).toLatin1());
system(QString("chmod -R u+rwx %1 2>/dev/null").arg(settingsPath("someDir")).toLatin1());
system(QString("rm -fr %1").arg(settingsPath("someDir")).toLatin1());