diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp index d05c5bca9fb..088f3e96f2e 100644 --- a/tests/auto/corelib/io/largefile/tst_largefile.cpp +++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp @@ -62,12 +62,17 @@ public: , fd_(-1) , stream_(0) { - #if defined(QT_LARGEFILE_SUPPORT) && !defined(Q_OS_MAC) + #if defined(QT_LARGEFILE_SUPPORT) && !defined(Q_OS_MAC) && !defined(Q_OS_QNX) maxSizeBits = 36; // 64 GiB #elif defined(Q_OS_MAC) // HFS+ does not support sparse files, so we limit file size for the test // on Mac OS. maxSizeBits = 24; // 16 MiB + #elif defined(Q_OS_QNX) + // Many of the filesystems that QNX supports use a 32-bit format. + // This means that files are limited to 2 GB − 1 bytes. + // Limit max size to 256MB + maxSizeBits = 28; // 256 MiB #else maxSizeBits = 24; // 16 MiB #endif