From 50248b1dacb5a4aa9c94eb5c574fe0925942f8d4 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Tue, 17 Jan 2012 09:49:15 +1000 Subject: 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 --- tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto/corelib/io') diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 4c2e3f211b..c7b4a283a7 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) {} -- cgit v1.2.3