tests: skip setPermissions test if running as root

Running this test as root doesn't make sense, and it is the reason
why QNX is failing.

Pick-to: 6.5
Change-Id: Ibbdce9090882cb9dd87d7fcd0802a481f9e7883c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 99cec50f56309c28712a444c40475ce69badfbf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Samuli Piippo 2023-10-30 11:15:32 +02:00 committed by Qt Cherry-pick Bot
parent 8ef3ff1c62
commit a911438755

View File

@ -1457,8 +1457,9 @@ void tst_QFile::setPermissions_data()
void tst_QFile::setPermissions() void tst_QFile::setPermissions()
{ {
#ifdef Q_OS_QNX #ifdef Q_OS_UNIX
QSKIP("This test doesn't pass on QNX and no one has cared to investigate."); if (::getuid() == 0)
QSKIP("Running this test as root doesn't make sense");
#endif #endif
QFETCH(bool, opened); QFETCH(bool, opened);