From 59a826e9a6b465e4376753b6a62ea5e9f29cfd78 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Jun 2023 08:13:11 -0700 Subject: [PATCH] tst_QFile: remove the timer in unixPipe and socketPair We were basically timing the qSleep, which is pointless. We don't need to verify that qSleep(X) spends at least X time. Because it also doesn't. Somehow, QNX can execute 1000 ms sleeps in 996 ms. Amends commit 30e5ff3ff223d665fbed3baf2d08ad3fcf2b8455. Change-Id: I46b5dede27114be29724fffd176a66c1799075b7 Reviewed-by: Volker Hilsheimer (cherry picked from commit 7d0431bb8bb32606e416fbdb67fe7d3d20fc9d8b) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/io/qfile/tst_qfile.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 64a3687e2a4..2f124a34ee2 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -2636,8 +2636,6 @@ static void unixPipe_helper(int pipes[2]) qt_safe_write(fd, &c, 1); })); - QElapsedTimer timer; - timer.start(); thr->start(); // synchronize with the thread having started @@ -2659,8 +2657,6 @@ static void unixPipe_helper(int pipes[2]) c = 0; QCOMPARE(f.read(&c, 1), 1); QCOMPARE(c, '\2'); - const int elapsed = timer.elapsed(); - QCOMPARE_GE(elapsed, Timeout); thr->wait(); }