Add QEXPECT_FAIL to tst_QApplication::sendEventsOnProcessEvents

Test sendEventsOnProcessEvents has been noticed to fail when
qgtk3 (Glib) is loaded - Should be fixed in QTBUG-87137

Moving test from blacklist to use QEXPECT_FAIL as it's more
recommended until test is fixed in the relevant configurations.

QEXPECT_FAIL is selected to use as original investigator
reported also some cases when glib is working. Therefore
this approach is giving us more insight for further
investigation is it always failing with glib or not.

It was also reported linkage to zeroTimer test QTBUG-84291,
but not sure why removing that has affected to this one.

Update to QEXPECT_FAIL documentation to tell in first place
that XPASS is not only marking it as XPASS but also failing
the test. Same is mentioned in different location but it
needs more searching or testing how it works in real test.

Task-number: QTBUG-115155
Change-Id: I7fb4ef28dba8adb7009be528f88fc758a12e9006
(cherry picked from commit de942651698d7dc6f2c2cabc1c0dc06b4e6b19fc)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Tero Heikkinen 2023-07-10 14:14:56 +00:00
parent 043ba52306
commit 1f0a31d6a6
3 changed files with 16 additions and 5 deletions

View File

@ -782,7 +782,8 @@
failure will be reported.
If a \l QVERIFY() or \l QCOMPARE() is marked as an expected failure,
but passes instead, an unexpected pass (XPASS) is written to the test log.
but passes instead, an unexpected pass (XPASS) is written to the test log
and will be counted as a test failure.
The parameter \a dataIndex describes for which entry in the test data the
failure is expected. Pass an empty string (\c{""}) if the failure

View File

@ -1,7 +1,3 @@
[sendEventsOnProcessEvents]
ubuntu-20.04
ubuntu-22.04
rhel-9.0
[touchEventPropagation]
# QTBUG-66745
opensuse-leap

View File

@ -164,6 +164,20 @@ void tst_QApplication::sendEventsOnProcessEvents()
QCoreApplication::postEvent(&app, new QEvent(QEvent::Type(QEvent::User + 1)));
QCoreApplication::processEvents();
#ifdef Q_OS_LINUX
if ((QSysInfo::productType() == "rhel" && QSysInfo::productVersion().startsWith(u'9'))
|| (QSysInfo::productType() == "ubuntu" && QSysInfo::productVersion().startsWith(u'2')))
{
QFile f("/proc/self/maps");
QVERIFY(f.open(QIODevice::ReadOnly));
QByteArray libs = f.readAll();
if (libs.contains("libqgtk3.") || libs.contains("libqgtk3TestInfix."))
QEXPECT_FAIL("", "Fails if qgtk3 (Glib) is loaded, see QTBUG-87137", Abort);
}
#endif
QVERIFY(spy.recordedEvents.contains(QEvent::User + 1));
}