From 14bae62bd2e965a25e61564eb2f7e61ad7b1e9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 11 Sep 2018 13:03:56 +0200 Subject: Blacklist flaky tst_QGL::graphicsViewClipping on RHEL 7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic771b263c988525d4b887cb2a1de9f9c7343e49b Reviewed-by: Liang Qi Reviewed-by: Tor Arne Vestbø --- tests/auto/opengl/qgl/BLACKLIST | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/auto/opengl/qgl/BLACKLIST b/tests/auto/opengl/qgl/BLACKLIST index 71be4bf19d..1eb0197484 100644 --- a/tests/auto/opengl/qgl/BLACKLIST +++ b/tests/auto/opengl/qgl/BLACKLIST @@ -19,6 +19,7 @@ winrt [graphicsViewClipping] windows winrt +rhel-7.4 ci [glFBOUseInGLWidget] windows winrt -- cgit v1.2.3 From 49efea26a5fae8c2275999c36c7c8d24cf4125de Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 12 Sep 2018 10:04:39 +0200 Subject: sqlite: Fix QSqlError handling when opening/closing database Both sqlite3_open_v2 and sqlite3_close are documented to return an error code: https://www.sqlite.org/c3ref/open.html https://sqlite.org/c3ref/close.html However, those were ignored (other than checking whether the operation succeeded), causing QSqlError::nativeErrorCode() to always be "-1" when there was an error while opening/closing the database. Additionally, the error string needs to be read (via sqlite3_errmsg16) in qMakeError *before* d->access is set to 0, or the databaseText() will always be "out of memory" no matter what error actually happened. Task-number: QTBUG-70506 Change-Id: I75cbf178c9711442e640afd26c4502214d20c598 Reviewed-by: Andy Shaw Reviewed-by: Simon Hausmann Reviewed-by: Edward Welbourne --- .../auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp index 1f055e9c33..8cf43e243b 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp @@ -197,6 +197,8 @@ private slots: void sqlite_enableRegexp_data() { generic_data("QSQLITE"); } void sqlite_enableRegexp(); + void sqlite_openError(); + private: void createTestTables(QSqlDatabase db); void dropTestTables(QSqlDatabase db); @@ -2332,6 +2334,22 @@ void tst_QSqlDatabase::sqlite_enableRegexp() QFAIL_SQL(q, next()); } +void tst_QSqlDatabase::sqlite_openError() +{ + // see QTBUG-70506 + if (!QSqlDatabase::drivers().contains("QSQLITE")) + QSKIP("Database driver QSQLITE not available"); + + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", "sqlite_openError"); + db.setDatabaseName("/doesnotexist/foo.sqlite"); + QVERIFY(db.isValid()); + + QVERIFY(!db.open()); + QSqlError error = db.lastError(); + QCOMPARE(error.nativeErrorCode(), "14"); // SQLITE_CANTOPEN + QCOMPARE(error.databaseText(), "unable to open database file"); +} + void tst_QSqlDatabase::cloneDatabase() { QFETCH(QString, dbName); -- cgit v1.2.3 From 004b3742a20c7643ae0db5f4e6a7841055eb6fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Thu, 13 Sep 2018 08:34:42 +0300 Subject: Blacklist a tst_QFileDialog2 test due to extreme flakiness in macOS Task-number: QTBUG-70087 Change-Id: Icc2467177209fef8aad59c5424e936ef96aa6289 Reviewed-by: Liang Qi --- tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST (limited to 'tests') diff --git a/tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST b/tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST new file mode 100644 index 0000000000..e0887d8ad1 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST @@ -0,0 +1,2 @@ +[QTBUG4419_lineEditSelectAll] +osx -- cgit v1.2.3 From f4dd670fe93b094aade3eac26adc81cf71b197b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Thu, 13 Sep 2018 09:13:08 +0300 Subject: Blacklist an extremely flaky tst_QDoubleSpinBox::editingFinished test Task-number: QTBUG-70088 Change-Id: I9239f379121f6167dd665ae3137a449d0ac5b6c7 Reviewed-by: Liang Qi --- tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST b/tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST new file mode 100644 index 0000000000..c1b6c9693e --- /dev/null +++ b/tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST @@ -0,0 +1,2 @@ +[editingFinished] +* -- cgit v1.2.3 From 6bb0cbc6865911c31f5edee7c24f270d265bd46d Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 15 Sep 2018 14:35:24 +0200 Subject: tst_QMdiSubWindow: fix flaky setOpaqueResizeAndMove test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tst_QMdiSubWindow::setOpaqueResizeAndMove checks if a resize of the mdi subwindow works as expected by simulating mouse events. Those events are sent to fast and therefore the operationMap of QMdiSubWindowPrivate is not yet updated which let the test fail. There was already a call to qWait(250) to wait for the 200ms timer but sometimes (esp. in virtual environments) the timer was not triggered after this period. Fix it by checking if resizeTimerId is set back to -1 which means that updateDirtyRegions() was called. Change-Id: I961ba80589d2f725a6858ba70b84fb35750a6964 Reviewed-by: Tony Sarajärvi --- tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro | 2 +- tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro b/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro index 4299f7711e..e33271428f 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro +++ b/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qmdisubwindow -QT += widgets testlib +QT += widgets widgets-private testlib INCLUDEPATH += . SOURCES += tst_qmdisubwindow.cpp DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index 4908f1b9f7..8b2f032172 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -30,6 +30,7 @@ #include #include "qmdisubwindow.h" +#include "private/qmdisubwindow_p.h" #include "qmdiarea.h" #include @@ -723,7 +724,9 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove() resizeSpy.clear(); QCOMPARE(resizeSpy.count(), 0); - QTest::qWait(250); // delayed update of dirty regions + // we need to wait for the resizeTimer to make sure updateDirtyRegions is called + auto priv = static_cast(qt_widget_private(window)); + QTRY_COMPARE(priv->resizeTimerId, -1); // Enter resize mode. int offset = window->style()->pixelMetric(QStyle::PM_MDIFrameWidth) / 2; -- cgit v1.2.3