Fix tst_QFileSysteMWatcher::basicTest on VxWorks
POSIX2008 demands that `stat` contains an `st_mtim` field of type `timespec`. That field holds modification time with a nanosecond resolution. VxWorks reports _POSIX_VERSION as 200112. The `stat` struct does not contain `st_mtim`, but rather an `st_mtime` which holds a `time_t` which contains seconds. Because of that, when the test creates and modifies a file within one second, the polling watcher does not detect any changes. Fix the problem by postponing the watcher by 1s. Pick-to: 6.7 Task-number: QTBUG-115777 Change-Id: Idfc1d7b2e111967a42c93c0adaffaa7d28ee20a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
cb8e5e0dd9
commit
7fad4df8df
@ -26,14 +26,18 @@
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
#if defined(Q_OS_QNX)
|
||||
// Longer polling times on QNX, otherwise the tests fail on the CI
|
||||
constexpr bool isQNX = true;
|
||||
#else
|
||||
constexpr bool isQNX = false;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_QNX) || defined(Q_OS_VXWORKS)
|
||||
// Longer polling times on QNX and VxWorks, otherwise the tests fail on the CI
|
||||
constexpr auto nativeEngineTimeout = 1s;
|
||||
constexpr auto pollingEngineTimeout = 1s;
|
||||
constexpr bool isQNX = true;
|
||||
#else
|
||||
constexpr auto nativeEngineTimeout = 0ms;
|
||||
constexpr auto pollingEngineTimeout = 20ms;
|
||||
constexpr bool isQNX = false;
|
||||
#endif
|
||||
|
||||
/* All tests need to run in temporary directories not used
|
||||
|
Loading…
x
Reference in New Issue
Block a user