tst_QSaveFile: skip test that fails when run as root
FAIL! : tst_QSaveFile::retryTransactionalWrite() '!file.open(QIODevice::WriteOnly)' returned FALSE. () Loc: [/home/tjmaciei/src/qt/qt5/qtbase/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp(156)] strace reveals: access("/TEMPDIR/outfile.ro", W_OK) = 0 Change-Id: Ibdc95e9af7bd456a94ecfffd1603eb371aadb02b Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
36feab8bf4
commit
135d98134f
@ -136,6 +136,10 @@ void tst_QSaveFile::retryTransactionalWrite()
|
||||
{
|
||||
#ifndef Q_OS_UNIX
|
||||
QSKIP("This test is Unix only");
|
||||
#else
|
||||
// root can open the read-only file for writing...
|
||||
if (geteuid() == 0)
|
||||
QSKIP("This test does not work as the root user");
|
||||
#endif
|
||||
QTemporaryDir dir;
|
||||
QVERIFY2(dir.isValid(), qPrintable(dir.errorString()));
|
||||
|
Loading…
Reference in New Issue
Block a user