summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tst_qsharedmemory: Use qt_test_helper functionalityOliver Wolff2018-07-311-839/+0
| | | | | Change-Id: I70b92b8350822f6d627e5f267188bb7d1d2946d9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Remove use of QRegExp from QSharedMemorySamuel Gaist2017-12-301-0/+1
| | | | | | | | | This patch updates the code from QSharedMemory to remove the use of the deprecated QRegExp class. It also updates the unique key test to avoid change of behavior going undetected. Change-Id: I649e615027507898800bb5454a62a6cf8bbb2e18 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QSharedMemory::readOnly: Skip on macOSFriedemann Kleint2017-06-071-0/+2
| | | | | | | | The binary hangs rather than segfaults on that platform. Task-number: QTBUG-59936 Change-Id: Id7d38edb7c746e3c0cd4b4941e0e19b3d42a628a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Properly use the "process" featureUlf Hermann2017-02-271-5/+7
| | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-5/+2
| | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * Fix tests for platforms without process supportMaurice Kalinowski2016-03-011-0/+2
| | | | | | | | | | Change-Id: I2d1cefdb5ff574635a75b54499efc392aba84434 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | tests/auto/corelib: Remove some placeholder formatting.Friedemann Kleint2015-10-221-1/+1
| | | | | | | | | | | | | | | | Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Ieffb429efdc14aa5932b3fcdef5a18e13a62d35f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | tests/corelib: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-08-191-12/+12
|/ | | | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Tests from corelib/tools were omitted in this change. Change-Id: I4c8786d33fcf429d11b2b624c7cd89c28cadb518 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Skip instead of entirely excluding tests with disabled featuresMarko Kangas2015-03-161-6/+12
| | | | | | | | | | | | Properly QSKIP tests that use disabled QProcess and symlink features instead of excluding them silently by #ifdef. Other reason is that moc doesn't respect QT_NO_* defines in class definition which causes build issues on some platforms. Change-Id: I041020f7452f7d36c7ec8a5866a4ba5eb23d1f94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Fix QT_POSIX_IPC supportPasi Petäjäjärvi2015-02-251-1/+1
| | | | | | | | | On platforms which does not have at all sysv support, all posix ipc tests and compilation failed because sysv specific header files were included unconditionally. Change-Id: I5713ace6daeb6e79f8794ce42b2b3dfa1b95ab2d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Add POSIX IPC support to QSystemSemaphore and QSharedMemoryTobias Koenig2015-01-091-5/+17
| | | | | | | | | This patch is a forward-port from 4.8 branch (d869e1ad4b0007757e97046609de2097cd9e9c5d). Change-Id: I6ae36a5417d1176fbecf775668f6033b1cb22a94 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Reduce repetitive invocations of QFINDTESTDATA.Friedemann Kleint2014-07-101-8/+12
| | | | | | | | | Store the file names in variables instead. Task-number: QTBUG-38890 Change-Id: I65f28bb62674f14aa099e935a9d7a4e9e6e90ba9 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Skip unstable autotestPaul Olav Tvete2013-03-121-0/+2
| | | | | | | | | | tst_QSharedMemory::simpleProcessProducerConsumer is on the top list of unstable autotests. Disabling it for now. Task-number: QTBUG-25655 Change-Id: Ib297b3382b736794bab6cdb668103bef74a55d8c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix minor typos in docs, printed messages & commentsSze Howe Koh2013-01-281-1/+1
| | | | | | | Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Check existence of QProcess feature before using it on Qt autotests.Pasi Petäjäjärvi2013-01-281-2/+6
| | | | | | | | VxWorks does not have QProcess support. Change-Id: I917b769f967e9d71ec5025aae788f3e237b07aeb Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit 416e73a0fcaf31f7c32ba7dcd214b62e6060123c)
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'gerrit/release' into stableFrederik Gladhorn2013-01-151-1/+1
|\ | | | | | | Change-Id: Ieb104d0e390218a063082c93bc9c7e412af2166d
| * Change all shmget calls to user-only memoryThiago Macieira2013-01-151-1/+1
| | | | | | | | | | | | | | | | Drop the read and write permissions for group and other users in the system. Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Resolve some race conditions on tst_QSharedMemoryThiago Macieira2013-01-141-7/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test runs fine almost all of the time on systems with 1 processor, which were the norm when the test was written and are still the way that the Qt Continuous Integration system works as of today. But it falls flatly on multi-processor systems. The root of the problem is that QSystemSemaphore recreates the semaphore if it disappears underneath it. However, the recreation process is not thread-safe at all: if two threads race to recreate it, weird things might happen. strace on Linux shows that a thread got stuck trying to acquire the semaphore: <... nanosleep resumed> NULL) = 0 stat("/tmp/qipc_systemsem_market5c9f73af73334ffe350c60ec076e5744db0ecda3", {st_mode=S_IFREG|0640, st_size=0, ...}) = 0 stat("/tmp/qipc_systemsem_market5c9f73af73334ffe350c60ec076e5744db0ecda3", {st_mode=S_IFREG|0640, st_size=0, ...}) = 0 semget(0x51001388, 1, IPC_CREAT|IPC_EXCL|0600) = -1 EEXIST (File exists) semget(0x51001388, 1, IPC_CREAT|0600) = 114786308 semop(114786308, {{0, -1, SEM_UNDO}}, 1 <unfinished ...> This problem does not happen if the creation and destruction of the QSharedMemory (which uses QSystemSemaphore) does not race with other threads or processes attaching and detaching. For the threads test it's easy. For the processes, we use stdin and stdout as a communication channel. Change-Id: Ie11b135431d4abfc59234654848b67f622eb03c9 Reviewed-by: Richard J. Moore <rich@kde.org>
* move QSharedMemory autotest from qtscript to qtbaseOliver Wolff2012-11-071-0/+809
As the script dependency for that autotest is not really needed it should be moved to qtbase. Task-number: QTBUG-27706 Change-Id: Ieda8b2182a20a77f53a0be9878e82e3236c79c2b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>