qt5base-lts/tests
Shawn Rutledge 3e2cd8ef6f fix QFileSystemEngine::createDirectory race condition
During a call to QDir::mkpath(), the same path could be created
by another process, in which case the OS mkdir will fail with EEXIST.
But the docs for mkpath() state that it's not an error if it
already exists, whereas for mkdir() it is an error.  So
QFileSystemEngine::createDirectory should accept the EEXIST error
silently if it occurs while creating the sequence of parent directories
and the final leaf directory, but should fail if EEXIST happens when
it was called from QDir::mkdir(), which is when the createParents
parameter is false.  We assume the operating system mkdir() and
CreateDirectory() are atomic, so there should be no race condition
in QDir::mkdir().  It's not necessary for mkpath() to call stat()
at each level, only to check whether an existing entry is a directory
or a file.  Also added to the autotest to verify that if the
path is an existing file, creating a dir with the same name will
fail in either mkdir or mkpath.

Task-number: QTBUG-30046
Change-Id: I926352f10654fdf3b322c8685bb85ad8b8844874
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-14 16:57:57 +02:00
..
auto fix QFileSystemEngine::createDirectory race condition 2013-06-14 16:57:57 +02:00
baselineserver Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
benchmarks Fix QMetaType benchmark. 2013-05-13 13:29:48 +02:00
global tst_bic: Add linux-gcc-ia32 bic data for QtXml 2013-01-16 08:25:28 +01:00
manual Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
shared Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
README Doc: Fix references to Qt Test 2013-01-30 01:35:06 +01:00
tests.pro Properly implement a 'make docs' target for subdirs and apps/libs 2012-05-09 08:34:42 +02:00

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.