From 33a1992cc9935aff180437d3f2385706c23f0baa Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 21 Aug 2012 22:17:34 +0200 Subject: test: Mark tst_QFile::writeLargeDataBlock() unstable failure as XFAIL The test has one unstable failure on Windows, so mark this with QEXPECT_FAIL Task-number: QTBUG-26906 Change-Id: I2f6c63ddefecacd224d93f83e6951e961a02a051 Reviewed-by: Rohan McGovern (cherry picked from qtbase/531b96f42ef225f6f680f6049ab718b0f6729a3d) Reviewed-by: Shane Kearns --- tests/auto/qfile/tst_qfile.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp index dc77cf9..3ed3fe5 100644 --- a/tests/auto/qfile/tst_qfile.cpp +++ b/tests/auto/qfile/tst_qfile.cpp @@ -2414,7 +2414,17 @@ void tst_QFile::writeLargeDataBlock() QVERIFY2( openFile(file, QIODevice::WriteOnly, (FileType)type), qPrintable(QString("Couldn't open file for writing: [%1]").arg(fileName)) ); - QCOMPARE( file.write(originalData), (qint64)originalData.size() ); + qint64 fileWriteOriginalData = file.write(originalData); + qint64 originalDataSize = (qint64)originalData.size(); +#if defined(Q_OS_WIN) + if (fileWriteOriginalData == -1) { + qWarning() << qPrintable(QString("Error writing a large data block to [%1]: %2") + .arg(fileName) + .arg(file.errorString())); + QEXPECT_FAIL("unc file", "QTBUG-26906", Abort); + } +#endif + QCOMPARE( fileWriteOriginalData, originalDataSize ); QVERIFY( file.flush() ); closeFile(file); -- cgit v0.12