summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2021-11-22 11:32:32 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-12-12 13:54:34 +0000
commit2fe5a2e3b9e4cf5d24c72b1e3d4d290c1d1e8b50 (patch)
treef89a8fd27600c552ed49f58f473b275035db6bc8 /tests
parent7488648081493587dc55f97db065daec1503c210 (diff)
QNX: Successful check depends on user running test
Modify similar like is used for Windows Change-Id: I133a8dde2e78cc66aa9544246cd750a6543b4883 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit ac8ce185222ba3bad6bc3e3b28f24b6fc14bbe78) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index d08604587e..b699926053 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1864,7 +1864,7 @@ void tst_QFileInfo::isWritable()
#endif
#if defined (Q_OS_QNX) // On QNX /etc is usually on a read-only filesystem
- QVERIFY(!QFileInfo("/etc/passwd").isWritable());
+ QCOMPARE(QFileInfo("/etc/passwd").isWritable(), (geteuid() == 0));
#elif defined (Q_OS_UNIX) && !defined(Q_OS_VXWORKS) // VxWorks does not have users/groups
for (const char *attempt : { "/etc/passwd", "/etc/machine-id", "/proc/version" }) {
if (access(attempt, F_OK) == -1)