From: Kurt Korbatits Date: Mon, 16 Jan 2012 23:49:15 +0000 (+1000) Subject: Added check to qtemporaryfile unittest if run as root user X-Git-Tag: qt-v5.0.0-alpha1~1773 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50248b1dacb5a4aa9c94eb5c574fe0925942f8d4;p=profile%2Fivi%2Fqtbase.git Added check to qtemporaryfile unittest if run as root user - nonWritableCurrentDir() function not valid test if run as root so added skip. Change-Id: I772e8356e6f798f5acdf7688c55f3241ad012a43 Reviewed-by: Kurt Korbatits Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 4c2e3f2..c7b4a28 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -256,6 +256,9 @@ void tst_QTemporaryFile::autoRemove() void tst_QTemporaryFile::nonWritableCurrentDir() { #ifdef Q_OS_UNIX + if (::geteuid() == 0) + QSKIP("not valid running this test as root"); + struct ChdirOnReturn { ChdirOnReturn(const QString& d) : dir(d) {}