From 3502790551a6eee2af5df8794ecde1d6172e2576 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Wed, 6 Nov 2024 09:41:09 +0100 Subject: [PATCH] tst_QNetworkReply: add more checks for blocking keychain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are more tests that create TLS server and can potentially fail in case SecureTransport backend is in use. Task-number: QTBUG-130500 Change-Id: Iaf2071c19f3cc0d3617bfc8c484b464c1a212d5a Reviewed-by: Tor Arne Vestbø (cherry picked from commit 81e7d3f95a1646d91d126596d0d7d6acf106298a) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/network/access/qnetworkreply/BLACKLIST | 1 - .../network/access/qnetworkreply/tst_qnetworkreply.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index 57f9c0634a0..a4c7c1ee304 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -11,7 +11,6 @@ opensuse-leap b2qt ubuntu windows-10 -macos-15 # QTBUG-130500 [putToFtp] windows-10 [backgroundRequest] diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 4e5ae52639f..a65f030d063 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -5617,6 +5617,9 @@ void tst_QNetworkReply::ioPostToHttpsUploadProgress() { //QFile sourceFile(testDataDir + "/bigfile"); //QVERIFY(sourceFile.open(QIODevice::ReadOnly)); + if (QtNetworkTestHelpers::isSecureTransportBlockingTest()) + QSKIP("SecureTransport: temporary keychain is not working on this version of macOS"); + qint64 wantedSize = 2*1024*1024; // 2 MB QByteArray sourceFile; // And in the case of SSL, the compression can fool us and let the @@ -9147,6 +9150,9 @@ void tst_QNetworkReply::ioHttpRedirectErrors() QFETCH(QNetworkReply::NetworkError, error); QUrl localhost(url); + if (localhost.scheme() == QLatin1String("https") && QtNetworkTestHelpers::isSecureTransportBlockingTest()) + QSKIP("SecureTransport: temporary keychain is not working on this version of macOS"); + MiniHttpServer server("", localhost.scheme() == QLatin1String("https")); localhost.setPort(server.serverPort()); @@ -9223,6 +9229,8 @@ void tst_QNetworkReply::ioHttpRedirectPolicy() QFETCH(const QNetworkRequest::RedirectPolicy, policy); QFETCH(const bool, ssl); + if (ssl && QtNetworkTestHelpers::isSecureTransportBlockingTest()) + QSKIP("SecureTransport: temporary keychain is not working on this version of macOS"); QFETCH(const int, redirectCount); QFETCH(const int, statusCode); @@ -9305,6 +9313,8 @@ void tst_QNetworkReply::ioHttpRedirectPolicyErrors() QVERIFY(policy != QNetworkRequest::ManualRedirectPolicy); QFETCH(const bool, ssl); + if (ssl && QtNetworkTestHelpers::isSecureTransportBlockingTest()) + QSKIP("SecureTransport: temporary keychain is not working on this version of macOS"); QFETCH(const QString, location); QFETCH(const int, maxRedirects); QFETCH(const QNetworkReply::NetworkError, expectedError);