summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp4
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp65
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp2
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp3
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp53
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp43
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp44
-rw-r--r--tests/auto/gui/kernel/qguitimer/BLACKLIST8
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST1
-rw-r--r--tests/auto/gui/text/qglyphrun/BLACKLIST2
-rw-r--r--tests/auto/network/access/hsts/tst_qhsts.cpp6
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp12
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/BLACKLIST3
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp17
-rw-r--r--tests/auto/other/gestures/BLACKLIST7
-rw-r--r--tests/auto/other/networkselftest/BLACKLIST3
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/BLACKLIST1
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST1
-rw-r--r--tests/auto/widgets/itemviews/qlistview/BLACKLIST2
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp54
-rw-r--r--tests/auto/widgets/kernel/qapplication/BLACKLIST1
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST3
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/BLACKLIST3
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/BLACKLIST1
24 files changed, 311 insertions, 28 deletions
diff --git a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index 7bba0b710b..2c5a5c96a6 100644
--- a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -426,10 +426,10 @@ void tst_QtConcurrentRun::implicitConvertibleTypes()
{
QThreadPool pool;
- double d;
+ double d = 0.0;
run(doubleFunction, d).waitForFinished();
run(&pool, doubleFunction, d).waitForFinished();
- int i;
+ int i = 0;
run(doubleFunction, d).waitForFinished();
run(&pool, doubleFunction, d).waitForFinished();
run(doubleFunction, i).waitForFinished();
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 0f27901f94..084f8dc037 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -58,6 +58,8 @@ private slots:
#ifdef QT_BUILD_INTERNAL
void cleanupFuncinfo_data();
void cleanupFuncinfo();
+ void cleanupFuncinfoBad_data();
+ void cleanupFuncinfoBad();
#endif
void qMessagePattern_data();
@@ -672,6 +674,26 @@ void tst_qmessagehandler::cleanupFuncinfo_data()
<< "int TestClass1::operator>(int)"
<< "TestClass1::operator>";
+ QTest::newRow("gcc_40")
+ << "Polymorphic<void (*)(int)>::~Polymorphic()"
+ << "Polymorphic::~Polymorphic";
+
+ QTest::newRow("gcc_41")
+ << "function<void (int*)>()::S::f()"
+ << "function()::S::f";
+
+ QTest::newRow("msvc_41")
+ << "void `void function<void __cdecl(int *)>(void)'::`2'::S::f(void)"
+ << "function(void)'::`2'::S::f";
+
+ QTest::newRow("gcc_42")
+ << "function<Polymorphic<void (int*)> >()::S::f(Polymorphic<void (int*)>*)"
+ << "function()::S::f";
+
+ QTest::newRow("msvc_42")
+ << "void `void function<Polymorphic<void __cdecl(int *)> >(void)'::`2'::S::f(Polymorphic<void __cdecl(int *)> *)"
+ << "function(void)'::`2'::S::f";
+
QTest::newRow("objc_1")
<< "-[SomeClass someMethod:withArguments:]"
<< "-[SomeClass someMethod:withArguments:]";
@@ -687,6 +709,14 @@ void tst_qmessagehandler::cleanupFuncinfo_data()
QTest::newRow("objc_4")
<< "__31-[SomeClass someMethodSchedulingBlock]_block_invoke"
<< "__31-[SomeClass someMethodSchedulingBlock]_block_invoke";
+
+ QTest::newRow("thunk-1")
+ << "non-virtual thunk to QFutureWatcherBasePrivate::postCallOutEvent(QFutureCallOutEvent const&)"
+ << "QFutureWatcherBasePrivate::postCallOutEvent";
+
+ QTest::newRow("thunk-2")
+ << "virtual thunk to std::basic_iostream<char, std::char_traits<char> >::~basic_iostream()"
+ << "std::basic_iostream::~basic_iostream";
}
#endif
@@ -707,6 +737,41 @@ void tst_qmessagehandler::cleanupFuncinfo()
QEXPECT_FAIL("TestClass1::nested_struct_const", "Nested function processing is broken", Continue);
QTEST(QString::fromLatin1(result), "expected");
}
+
+void tst_qmessagehandler::cleanupFuncinfoBad_data()
+{
+ QTest::addColumn<QByteArray>("funcinfo");
+
+ auto addBadFrame = [i = 0](const char *symbol) mutable {
+ QTest::addRow("%d", ++i) << QByteArray(symbol);
+ };
+ addBadFrame("typeinfo for QEventLoop");
+ addBadFrame("typeinfo name for QtPrivate::ResultStoreBase");
+ addBadFrame("typeinfo name for ._anon_476");
+ addBadFrame("typeinfo name for std::__1::__function::__base<bool (void*, void*)>");
+ addBadFrame("vtable for BezierEase");
+ addBadFrame("vtable for Polymorphic<void ()>");
+ addBadFrame("vtable for Polymorphic<void (*)(int)>");
+ addBadFrame("TLS wrapper function for (anonymous namespace)::jitStacks");
+ addBadFrame("lcCheckIndex()::category");
+ addBadFrame("guard variable for lcEPDetach()::category");
+ addBadFrame("guard variable for QImageReader::read(QImage*)::disableNxImageLoading");
+ addBadFrame("VTT for std::__1::ostrstream");
+ addBadFrame("qIsRelocatable<(anonymous namespace)::Data>");
+ addBadFrame("qt_incomplete_metaTypeArray<(anonymous namespace)::qt_meta_stringdata_CLASSQNonContiguousByteDeviceIoDeviceImplENDCLASS_t, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, true> > >");
+ addBadFrame("f()::i");
+}
+
+void tst_qmessagehandler::cleanupFuncinfoBad()
+{
+ QFETCH(QByteArray, funcinfo);
+
+ // A corrupted stack trace may find non-sensical symbols that aren't
+ // functions. The result doesn't matter, so long as we don't crash or hang.
+
+ QByteArray result = qCleanupFuncinfo(funcinfo);
+ qDebug() << "Decode of" << funcinfo << "produced" << result;
+}
#endif
void tst_qmessagehandler::qMessagePattern_data()
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 780b6165c3..c527f1ce3a 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -3470,12 +3470,10 @@ void tst_QUrl::effectiveTLDs_data()
QTest::newRow("yes0") << QUrl::fromEncoded("http://test.co.uk") << ".co.uk";
QTest::newRow("yes1") << QUrl::fromEncoded("http://test.com") << ".com";
QTest::newRow("yes2") << QUrl::fromEncoded("http://www.test.de") << ".de";
- QTest::newRow("yes3") << QUrl::fromEncoded("http://test.ulm.museum") << ".ulm.museum";
QTest::newRow("yes4") << QUrl::fromEncoded("http://www.com.krodsherad.no") << ".krodsherad.no";
QTest::newRow("yes5") << QUrl::fromEncoded("http://www.co.uk.1.bg") << ".1.bg";
QTest::newRow("yes6") << QUrl::fromEncoded("http://www.com.com.cn") << ".com.cn";
QTest::newRow("yes7") << QUrl::fromEncoded("http://www.test.org.ws") << ".org.ws";
- QTest::newRow("yes9") << QUrl::fromEncoded("http://www.com.co.uk.wallonie.museum") << ".wallonie.museum";
QTest::newRow("yes10") << QUrl::fromEncoded("http://www.com.evje-og-hornnes.no") << ".evje-og-hornnes.no";
QTest::newRow("yes11") << QUrl::fromEncoded("http://www.bla.kamijima.ehime.jp") << ".kamijima.ehime.jp";
QTest::newRow("yes12") << QUrl::fromEncoded("http://www.bla.kakuda.miyagi.jp") << ".kakuda.miyagi.jp";
diff --git a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
index ba1c77231f..d8aa17d9ef 100644
--- a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
@@ -914,7 +914,10 @@ void tst_QByteArray::qstrncpy()
// src == nullptr
QCOMPARE(::qstrncpy(dst.data(), 0, 0), (char*)0);
+ QCOMPARE(*dst.data(), 'b'); // must not have written to dst
QCOMPARE(::qstrncpy(dst.data(), 0, 10), (char*)0);
+ QCOMPARE(*dst.data(), '\0'); // must have written to dst
+ *dst.data() = 'b'; // restore
// valid pointers, but len == 0
QCOMPARE(::qstrncpy(dst.data(), src.data(), 0), dst.data());
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index 3eef7631c8..3abd68857f 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -47,6 +47,12 @@ private slots:
void files_data();
void files();
void hashLength();
+
+ // keep last
+ void keccakBufferOverflow();
+private:
+ void ensureLargeData();
+ std::vector<char> large;
};
void tst_QCryptographicHash::repeated_result_data()
@@ -303,5 +309,52 @@ void tst_QCryptographicHash::hashLength()
}
}
+void tst_QCryptographicHash::ensureLargeData()
+{
+#if QT_POINTER_SIZE > 4
+ QElapsedTimer timer;
+ timer.start();
+ const size_t GiB = 1024 * 1024 * 1024;
+ if (large.size() == 4 * GiB + 1)
+ return;
+ try {
+ large.resize(4 * GiB + 1, '\0');
+ } catch (const std::bad_alloc &) {
+ QSKIP("Could not allocate 4GiB plus one byte of RAM.");
+ }
+ QCOMPARE(large.size(), 4 * GiB + 1);
+ large.back() = '\1';
+ qDebug("created dataset in %lld ms", timer.elapsed());
+#endif
+}
+
+void tst_QCryptographicHash::keccakBufferOverflow()
+{
+#if QT_POINTER_SIZE == 4
+ QSKIP("This is a 64-bit-only test");
+#else
+
+ ensureLargeData();
+ if (large.empty())
+ return;
+
+ QElapsedTimer timer;
+ timer.start();
+ const auto sg = qScopeGuard([&] {
+ qDebug() << "test finished in" << timer.restart() << "ms";
+ });
+
+ constexpr qsizetype magic = INT_MAX/4;
+ QVERIFY(large.size() >= size_t(magic + 1));
+
+ QCryptographicHash hash(QCryptographicHash::Algorithm::Keccak_224);
+
+ hash.addData(large.data(), 1);
+ hash.addData(large.data() + 1, magic);
+ (void)hash.result();
+ QVERIFY(true); // didn't crash
+#endif
+}
+
QTEST_MAIN(tst_QCryptographicHash)
#include "tst_qcryptographichash.moc"
diff --git a/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp b/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp
index 2f8052fd4a..920c70c461 100644
--- a/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp
+++ b/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp
@@ -34,6 +34,8 @@ class tst_QMessageAuthenticationCode : public QObject
{
Q_OBJECT
private slots:
+ void repeated_setKey_data();
+ void repeated_setKey();
void result_data();
void result();
void result_incremental_data();
@@ -42,6 +44,47 @@ private slots:
Q_DECLARE_METATYPE(QCryptographicHash::Algorithm)
+void tst_QMessageAuthenticationCode::repeated_setKey_data()
+{
+ using A = QCryptographicHash::Algorithm;
+ QTest::addColumn<A>("algo");
+
+ const auto me = QMetaEnum::fromType<A>();
+ for (int i = 0, value; (value = me.value(i)) != -1; ++i)
+ QTest::addRow("%s", me.key(i)) << A(value);
+}
+
+void tst_QMessageAuthenticationCode::repeated_setKey()
+{
+ QFETCH(const QCryptographicHash::Algorithm, algo);
+
+ // GIVEN: two long keys, so we're sure the key needs to be hashed in order
+ // to fit into the hash algorithm's block
+
+ static const QByteArray key1(1024, 'a');
+ static const QByteArray key2(2048, 'b');
+
+ // WHEN: processing the same message
+
+ QMessageAuthenticationCode macX(algo);
+ QMessageAuthenticationCode mac1(algo, key1);
+ QMessageAuthenticationCode mac2(algo, key2);
+
+ const auto check = [](QMessageAuthenticationCode &mac) {
+ mac.addData("This is nonsense, ignore it, please.");
+ return mac.result();
+ };
+
+ macX.setKey(key1);
+ QCOMPARE(check(macX), check(mac1));
+
+ // THEN: the result does not depend on whether a new QMAC instance was used
+ // or an old one re-used (iow: setKey() reset()s)
+
+ macX.setKey(key2);
+ QCOMPARE(check(macX), check(mac2));
+}
+
void tst_QMessageAuthenticationCode::result_data()
{
QTest::addColumn<QCryptographicHash::Algorithm>("algo");
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
index d2f032ddcd..2347ea6d48 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -33,12 +33,29 @@
#include <memory>
+class NonCopyable
+{
+ Q_DISABLE_COPY(NonCopyable)
+ int n;
+public:
+ NonCopyable() : n(0) {}
+ explicit NonCopyable(int n) : n(n) {}
+
+ friend bool operator==(const NonCopyable &lhs, const NonCopyable &rhs) noexcept
+ { return lhs.n == rhs.n; }
+ friend bool operator!=(const NonCopyable &lhs, const NonCopyable &rhs) noexcept
+ { return !operator==(lhs, rhs); }
+};
+
class tst_QVarLengthArray : public QObject
{
Q_OBJECT
private slots:
void defaultConstructor_int() { defaultConstructor<int>(); }
void defaultConstructor_QString() { defaultConstructor<QString>(); }
+ void sizeConstructor_int() { sizeConstructor<int>(); }
+ void sizeConstructor_QString() { sizeConstructor<QString>(); }
+ void sizeConstructor_NonCopyable() { sizeConstructor<NonCopyable>(); }
void append();
void removeLast();
void oldTests();
@@ -67,6 +84,8 @@ private slots:
private:
template <typename T>
void defaultConstructor();
+ template <typename T>
+ void sizeConstructor();
template<typename T>
void initializeList();
};
@@ -103,6 +122,31 @@ void tst_QVarLengthArray::defaultConstructor()
}
}
+template <typename T>
+void tst_QVarLengthArray::sizeConstructor()
+{
+ {
+ QVarLengthArray<T, 123> vla(0);
+ QCOMPARE(vla.size(), 0);
+ QVERIFY(vla.empty());
+ QVERIFY(vla.isEmpty());
+ QCOMPARE(vla.begin(), vla.end());
+ QCOMPARE(vla.capacity(), 123);
+ }
+ {
+ QVarLengthArray<T, 124> vla(124);
+ QCOMPARE(vla.size(), 124);
+ QVERIFY(!vla.empty());
+ QCOMPARE(vla.capacity(), 124);
+ }
+ {
+ QVarLengthArray<T, 124> vla(125);
+ QCOMPARE(vla.size(), 125);
+ QVERIFY(!vla.empty());
+ QVERIFY(vla.capacity() >= 125);
+ }
+}
+
void tst_QVarLengthArray::append()
{
QVarLengthArray<QString, 2> v;
diff --git a/tests/auto/gui/kernel/qguitimer/BLACKLIST b/tests/auto/gui/kernel/qguitimer/BLACKLIST
index c6f1e9c892..cb678120cd 100644
--- a/tests/auto/gui/kernel/qguitimer/BLACKLIST
+++ b/tests/auto/gui/kernel/qguitimer/BLACKLIST
@@ -1,3 +1,7 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
-[zeroTimer]
-ci ubuntu-20.04 # QTBUG-108556
+[zeroTimer] # QTBUG-108556
+ci ubuntu-20.04
+ci sles-15.4
+
+[singleShotToFunctors]
+ci ubuntu-20.04 # QTBUG-108554
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index db7e261243..0a767e57e2 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -17,6 +17,7 @@ osx
windows-10
[testInputEvents]
rhel-7.4
+sles-15.4
[modalWindowPosition]
# QTBUG-69161
android
diff --git a/tests/auto/gui/text/qglyphrun/BLACKLIST b/tests/auto/gui/text/qglyphrun/BLACKLIST
index 4c2eb315cf..c9d0900296 100644
--- a/tests/auto/gui/text/qglyphrun/BLACKLIST
+++ b/tests/auto/gui/text/qglyphrun/BLACKLIST
@@ -3,3 +3,5 @@ ubuntu-18.04
ubuntu-20.04
ubuntu-22.04
b2qt
+[drawRightToLeft]
+opensuse-leap-15.4 # QTBUG-89169
diff --git a/tests/auto/network/access/hsts/tst_qhsts.cpp b/tests/auto/network/access/hsts/tst_qhsts.cpp
index d72991a2eb..c3c5f58c22 100644
--- a/tests/auto/network/access/hsts/tst_qhsts.cpp
+++ b/tests/auto/network/access/hsts/tst_qhsts.cpp
@@ -242,6 +242,12 @@ void tst_QHsts::testSTSHeaderParser()
QVERIFY(parser.includeSubDomains());
list.pop_back();
+ list << Header("strict-transport-security", "includeSubDomains;max-age=1000");
+ QVERIFY(parser.parse(list));
+ QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
+ QVERIFY(parser.includeSubDomains());
+
+ list.pop_back();
// Invalid (includeSubDomains twice):
list << Header("Strict-Transport-Security", "max-age = 1000 ; includeSubDomains;includeSubDomains");
QVERIFY(!parser.parse(list));
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 55482fed97..0a78c8967a 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -413,13 +413,11 @@ void tst_QNetworkCookieJar::effectiveTLDs_data()
QTest::newRow("yes1") << "com" << true;
QTest::newRow("yes2") << "de" << true;
- QTest::newRow("yes3") << "ulm.museum" << true;
QTest::newRow("yes4") << "krodsherad.no" << true;
QTest::newRow("yes5") << "1.bg" << true;
QTest::newRow("yes6") << "com.cn" << true;
QTest::newRow("yes7") << "org.ws" << true;
QTest::newRow("yes8") << "co.uk" << true;
- QTest::newRow("yes9") << "wallonie.museum" << true;
QTest::newRow("yes10") << "hk.com" << true;
QTest::newRow("yes11") << "hk.org" << true;
@@ -436,33 +434,23 @@ void tst_QNetworkCookieJar::effectiveTLDs_data()
QTest::newRow("no11") << "mosreg.ru" << false;
const ushort s1[] = {0x74, 0x72, 0x61, 0x6e, 0xf8, 0x79, 0x2e, 0x6e, 0x6f, 0x00}; // xn--trany-yua.no
- const ushort s2[] = {0x5d9, 0x5e8, 0x5d5, 0x5e9, 0x5dc, 0x5d9, 0x5dd, 0x2e, 0x6d, 0x75, 0x73, 0x65, 0x75, 0x6d, 0x00}; // xn--9dbhblg6di.museum
const ushort s3[] = {0x7ec4, 0x7e54, 0x2e, 0x68, 0x6b, 0x00}; // xn--mk0axi.hk
const ushort s4[] = {0x7f51, 0x7edc, 0x2e, 0x63, 0x6e, 0x00}; // xn--io0a7i.cn
const ushort s5[] = {0x72, 0xe1, 0x68, 0x6b, 0x6b, 0x65, 0x72, 0xe1, 0x76, 0x6a, 0x75, 0x2e, 0x6e, 0x6f, 0x00}; // xn--rhkkervju-01af.no
const ushort s6[] = {0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0, 0xbcd, 0x00}; // xn--clchc0ea0b2g2a9gcd
const ushort s7[] = {0x627, 0x644, 0x627, 0x631, 0x62f, 0x646, 0x00}; // xn--mgbayh7gpa
- const ushort s8[] = {0x63, 0x6f, 0x72, 0x72, 0x65, 0x69, 0x6f, 0x73, 0x2d, 0x65, 0x2d, 0x74, 0x65, 0x6c, 0x65,
- 0x63, 0x6f, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0xe7, 0xf5, 0x65, 0x73, 0x2e, 0x6d, 0x75,
- 0x73, 0x65, 0x75, 0x6d, 0x00}; // xn--correios-e-telecomunicaes-ghc29a.museum
QTest::newRow("yes-specialchars1") << QString::fromUtf16(s1) << true;
- QTest::newRow("yes-specialchars2") << QString::fromUtf16(s2) << true;
QTest::newRow("yes-specialchars3") << QString::fromUtf16(s3) << true;
QTest::newRow("yes-specialchars4") << QString::fromUtf16(s4) << true;
QTest::newRow("yes-specialchars5") << QString::fromUtf16(s5) << true;
QTest::newRow("yes-specialchars6") << QString::fromUtf16(s6) << true;
QTest::newRow("yes-specialchars7") << QString::fromUtf16(s7) << true;
- QTest::newRow("yes-specialchars8") << QString::fromUtf16(s8) << true;
QTest::newRow("no-specialchars1") << QString::fromUtf16(s1).prepend("something") << false;
- QTest::newRow("no-specialchars2") << QString::fromUtf16(s2).prepend(QString::fromUtf16(s2)) << false;
- QTest::newRow("no-specialchars2.5") << QString::fromUtf16(s2).prepend("whatever") << false;
QTest::newRow("no-specialchars3") << QString::fromUtf16(s3).prepend("foo") << false;
QTest::newRow("no-specialchars4") << QString::fromUtf16(s4).prepend("bar") << false;
- QTest::newRow("no-specialchars5") << QString::fromUtf16(s5).prepend(QString::fromUtf16(s2)) << false;
QTest::newRow("no-specialchars6") << QString::fromUtf16(s6).prepend(QLatin1Char('.') + QString::fromUtf16(s6)) << false;
QTest::newRow("no-specialchars7") << QString::fromUtf16(s7).prepend("bla") << false;
- QTest::newRow("no-specialchars8") << QString::fromUtf16(s8).append("foo") << false;
QTest::newRow("exception1") << "pref.iwate.jp" << false;
QTest::newRow("exception2") << "omanpost.om" << false;
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/BLACKLIST b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/BLACKLIST
new file mode 100644
index 0000000000..4207625536
--- /dev/null
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-63481
+[onDemandRootCertLoadingMemberMethods]
+*
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
index 000f2f4da9..bfa610b083 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
@@ -219,6 +219,7 @@ static bool waitForEncrypted(QSslSocket *socket)
void tst_QSslSocket_onDemandCertificates_member::onDemandRootCertLoadingMemberMethods()
{
+#define ERR(socket) socket->errorString().toLatin1()
const QString host("www.qt.io");
// not using any root certs -> should not work
@@ -228,13 +229,13 @@ void tst_QSslSocket_onDemandCertificates_member::onDemandRootCertLoadingMemberMe
sslConfig.setCaCertificates(QList<QSslCertificate>());
socket2->setSslConfiguration(sslConfig);
socket2->connectToHostEncrypted(host, 443);
- QVERIFY(!waitForEncrypted(socket2.data()));
+ QVERIFY2(!waitForEncrypted(socket2.data()), ERR(socket2));
// default: using on demand loading -> should work
QSslSocketPtr socket = newSocket();
this->socket = socket.data();
socket->connectToHostEncrypted(host, 443);
- QVERIFY2(waitForEncrypted(socket.data()), qPrintable(socket->errorString()));
+ QVERIFY2(waitForEncrypted(socket.data()), ERR(socket));
// not using any root certs again -> should not work
QSslSocketPtr socket3 = newSocket();
@@ -243,7 +244,7 @@ void tst_QSslSocket_onDemandCertificates_member::onDemandRootCertLoadingMemberMe
sslConfig.setCaCertificates(QList<QSslCertificate>());
socket3->setSslConfiguration(sslConfig);
socket3->connectToHostEncrypted(host, 443);
- QVERIFY(!waitForEncrypted(socket3.data()));
+ QVERIFY2(!waitForEncrypted(socket3.data()), ERR(socket3));
// setting empty SSL configuration explicitly -> depends on on-demand loading
QSslSocketPtr socket4 = newSocket();
@@ -254,16 +255,20 @@ void tst_QSslSocket_onDemandCertificates_member::onDemandRootCertLoadingMemberMe
#ifdef QT_BUILD_INTERNAL
const bool works = QSslSocketPrivate::rootCertOnDemandLoadingSupported();
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
- QCOMPARE(works, true);
+ QVERIFY2(works, ERR(socket4));
#elif defined(Q_OS_MAC)
- QCOMPARE(works, false);
+ QVERIFY2(!works, ERR(socket4));
#endif // other platforms: undecided.
// When we *allow* on-demand loading, we enable it by default; so, on Unix,
// it will work without setting any certificates. Otherwise, the configuration
// contains an empty set of certificates, so on-demand loading shall fail.
- QCOMPARE(waitForEncrypted(socket4.data()), works);
+ const bool result = waitForEncrypted(socket4.data());
+ if (result != works)
+ qDebug() << socket4->errorString();
+ QCOMPARE(waitForEncrypted(socket4.data()), works);
#endif // QT_BUILD_INTERNAL
}
+#undef ERR
#endif // QT_NO_OPENSSL
diff --git a/tests/auto/other/gestures/BLACKLIST b/tests/auto/other/gestures/BLACKLIST
index 04574f90d3..1de0e369a9 100644
--- a/tests/auto/other/gestures/BLACKLIST
+++ b/tests/auto/other/gestures/BLACKLIST
@@ -3,6 +3,7 @@ rhel-7.4
rhel-7.6
ubuntu-18.04
sles-15
+sles-15.4
rhel-8.4
[customGesture]
opensuse-leap
@@ -15,6 +16,7 @@ ubuntu-18.04
rhel-7.4
rhel-7.6
sles-15
+sles-15.4
rhel-8.4
[graphicsItemTreeGesture]
# QTBUG-103054
@@ -27,6 +29,7 @@ ubuntu-18.04
rhel-7.4
rhel-7.6
sles-15
+sles-15.4
rhel-8.4
[explicitGraphicsObjectTarget]
# QTBUG-103054
@@ -35,6 +38,7 @@ ubuntu-18.04
rhel-7.4
rhel-7.6
sles-15
+sles-15.4
rhel-8.4
[autoCancelGestures2]
# QTBUG-103054
@@ -43,8 +47,9 @@ ubuntu-18.04
rhel-7.4
rhel-7.6
sles-15
+sles-15.4
rhel-8.4
#QTBUG-103054
[testReuseCanceledGestures]
-ubuntu-20
+ubuntu-20 \ No newline at end of file
diff --git a/tests/auto/other/networkselftest/BLACKLIST b/tests/auto/other/networkselftest/BLACKLIST
index 55ebad985d..8b59f391f3 100644
--- a/tests/auto/other/networkselftest/BLACKLIST
+++ b/tests/auto/other/networkselftest/BLACKLIST
@@ -2,4 +2,5 @@
[ftpProxyServer]
windows-7sp1
windows-10
-
+[smbServer]
+opensuse-leap-15.4 # QTBUG-89209
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/BLACKLIST
index ce0e42b3c7..94483628fd 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/BLACKLIST
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/BLACKLIST
@@ -1,2 +1,3 @@
[layoutDirection]
ubuntu-20.04
+sles-15.4
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST
index 5eda888af6..d73129ee40 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST
+++ b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST
@@ -4,3 +4,4 @@ opensuse-42.3 ci
opensuse-42.3 ci
[editorKeyPress]
ubuntu-20.04
+sles-15.4
diff --git a/tests/auto/widgets/itemviews/qlistview/BLACKLIST b/tests/auto/widgets/itemviews/qlistview/BLACKLIST
index 2d3ae59eb1..4925d0bdc4 100644
--- a/tests/auto/widgets/itemviews/qlistview/BLACKLIST
+++ b/tests/auto/widgets/itemviews/qlistview/BLACKLIST
@@ -1,3 +1,3 @@
[internalDragDropMove]
opensuse ci
-
+sles-15.4
diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
index 67d8764b61..c7cde7e65a 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
+++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
@@ -33,6 +33,7 @@
#include <QSignalSpy>
#include <QStyledItemDelegate>
#include <QTest>
+#include <QLabel>
#include <private/qlistwidget_p.h>
using IntList = QVector<int>;
@@ -126,6 +127,7 @@ private slots:
void moveRows();
void moveRowsInvalid_data();
void moveRowsInvalid();
+ void noopDragDrop();
protected slots:
void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last)
@@ -1852,6 +1854,58 @@ void tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSet()
}
+// Test that dropping an item on or beneath itself remains a no-op
+void tst_QListWidget::noopDragDrop() // QTBUG-100128
+{
+ QListWidget listWidget;
+ QList<QListWidgetItem *> items;
+ for (int i = 0; i < 5; ++i) {
+ const QString number = QString::number(i);
+ QListWidgetItem *item = new QListWidgetItem(&listWidget);
+ item->setData(Qt::UserRole, number);
+ QLabel *label = new QLabel(number);
+ listWidget.setItemWidget(item, label);
+ items.append(item);
+ }
+
+ listWidget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&listWidget));
+
+ const QRect &lastItemRect = listWidget.visualItemRect(items.at(4));
+ const QPoint &dragStart = lastItemRect.center();
+ const QPoint &dropPointNirvana = lastItemRect.center() + QPoint(20, 2 * lastItemRect.height());
+
+ // Implement check as a macro (not a method) to safely determine the error location.
+ // The macro checks that item data and item widget remain unchanged when drag&drop are executed.
+ // In order to verify that the assets do *not* change, we can't use QTRY*: These macros would
+ // spin the event loop only once, while 3/4 mouse events need to get processed.
+ // That's why we spin the event loop 13 times, to make sure other unexpected or pending events
+ // get processed.
+#define CHECK_ITEM {\
+ const QString number = QString::number(4);\
+ for (int i = 0; i < 13; ++i)\
+ QApplication::processEvents();\
+ QLabel *label = qobject_cast<QLabel *>(listWidget.itemWidget(items.at(4)));\
+ QVERIFY(label);\
+ QCOMPARE(label->text(), number);\
+ const QString &data = items.at(4)->data(Qt::UserRole).toString();\
+ QCOMPARE(data, number);\
+ }
+
+ // Test dropping last item beneath itself
+ QTest::mousePress(&listWidget, Qt::LeftButton, Qt::KeyboardModifiers(), dragStart);
+ QTest::mouseMove(&listWidget, dropPointNirvana);
+ QTest::mouseRelease(&listWidget, Qt::LeftButton);
+ CHECK_ITEM;
+
+ // Test dropping last item on itself
+ QTest::mousePress(&listWidget, Qt::LeftButton, Qt::KeyboardModifiers(), dragStart);
+ QTest::mouseMove(&listWidget, dropPointNirvana);
+ QTest::mouseMove(&listWidget, dragStart);
+ QTest::mouseRelease(&listWidget, Qt::LeftButton);
+ CHECK_ITEM;
+}
+
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void tst_QListWidget::clearItemData()
{
diff --git a/tests/auto/widgets/kernel/qapplication/BLACKLIST b/tests/auto/widgets/kernel/qapplication/BLACKLIST
index 7f4dd88261..e04cceeea2 100644
--- a/tests/auto/widgets/kernel/qapplication/BLACKLIST
+++ b/tests/auto/widgets/kernel/qapplication/BLACKLIST
@@ -2,6 +2,7 @@
ubuntu-20.04
ubuntu-22.04
rhel-9.0
+sles-15.4
[touchEventPropagation]
# QTBUG-66745
opensuse-leap
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 16e8dc717d..a4337d15bc 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -39,7 +39,8 @@ sles-15
[windowState]
# QTBUG-75270
winrt
-
+[widgetAt]
+sles-15.4 # QTBUG-112760
[syntheticEnterLeave]
macos # Can't move cursor (QTBUG-76312)
[taskQTBUG_4055_sendSyntheticEnterLeave]
diff --git a/tests/auto/widgets/kernel/qwidget_window/BLACKLIST b/tests/auto/widgets/kernel/qwidget_window/BLACKLIST
index b4d938d641..cea1f26e53 100644
--- a/tests/auto/widgets/kernel/qwidget_window/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget_window/BLACKLIST
@@ -6,6 +6,9 @@ ubuntu-16.04
[mouseMoveWithPopup]
winrt
+[tst_dnd_events]
+sles-15.4 # QTBUG-112760
+
# QTBUG-96270
[tst_paintEventOnSecondShow]
opensuse
diff --git a/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST b/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST
index b281eca3bf..6c31a8d1d6 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST
+++ b/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST
@@ -1,3 +1,4 @@
[stackWidgetOpaqueChildIsVisible]
windows-10 msvc-2017
+sles-15.4 # QTBUG-104241