diff options
Diffstat (limited to 'tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp')
-rw-r--r-- | tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp index 626c3757da..b8836668f5 100644 --- a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp +++ b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp @@ -1,31 +1,6 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Thiago Macieira <thiago@kde.org> -** Copyright (C) 2016 Intel Corporation. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 Thiago Macieira <thiago@kde.org> +// Copyright (C) 2016 Intel Corporation. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QThread> #include <QTest> @@ -148,7 +123,7 @@ void tst_QGlobalStatic::exception() exceptionCaught = true; } QVERIFY(exceptionCaught); - QCOMPARE(Q_QGS_throwingGS::guard.loadRelaxed(), 0); + QCOMPARE(QtGlobalStatic::Holder<Q_QGS_throwingGS>::guard.loadRelaxed(), 0); QVERIFY(!throwingGS.exists()); QVERIFY(!throwingGS.isDestroyed()); } @@ -206,7 +181,13 @@ void tst_QGlobalStatic::threadStressTest() if (expectedConstructionCount <= 0) QSKIP("This test cannot be run more than once"); +#ifdef Q_OS_INTEGRITY + // OPEN_REALTIME_THREADS = 123 on current INTEGRITY environment + // if try to create more, app is halted + const int numThreads = 122; +#else const int numThreads = 200; +#endif ThreadStressTestThread threads[numThreads]; QReadWriteLock lock; lock.lockForWrite(); |