Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19699

qws/linux failing upgraded tst_QEventLoop::processEventsExcludeSocket

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.8.0
    • Core: Event loop
    • None

    Description

      As part of QTBUG-15019, tst_qeventloop was upgraded with the diff below. The test of the effectiveness of the QEventLoop::ExcludeSocketNotifiers flag is extended to a 200ms run of QEventLoop::exec(), rather than just a single run of QCoreApplication::processEvents().

      This is passing on Windows, Mac, normal Linux and Symbian. But CI is reporting a failure on qws/linux-x86-g++. The test itself looks valid, so I suspect a qws event loop bug.

      Unfortunately I have not been able to reproduce this myself. I believe I have a qws build under test. For the moment, I am XFAILing the test for qws.

      diff --git a/tests/auto/qeventloop/tst_qeventloop.cpp b/tests/auto/qeventloop/tst_qeventloop.cpp
      index b31f8cd..9196a47 100644
      — a/tests/auto/qeventloop/tst_qeventloop.cpp
      +++ b/tests/auto/qeventloop/tst_qeventloop.cpp
      @@ -602,10 +602,12 @@ public slots:
      QTcpSocket *serverSocket = server->nextPendingConnection();
      serverSocket->write(data, size);
      serverSocket->flush();

      • QTest::qSleep(200); //allow the TCP/IP stack time to loopback the data, so our socket is ready to read
      • QCoreApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
        + QEventLoop loop;
        + QTimer::singleShot(200, &loop, SLOT(quit())); //allow the TCP/IP stack time to loopback the data, so our socket is ready to read
        + loop.exec(QEventLoop::ExcludeSocketNotifiers);
        testResult = dataArrived;
      • QCoreApplication::processEvents(); //check the deferred event is processed
        + QTimer::singleShot(200, &loop, SLOT(quit()));
        + loop.exec(); //check the deferred event is processed
        serverSocket->close();
        QThread::currentThread()->exit(0);
        }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            mread Murray Read
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes