summaryrefslogtreecommitdiffstats
path: root/tests/auto/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in license headers.Jason McDonald2012-01-0528-30/+30
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray ↵Sami Rosendahl2011-12-251-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | extraction QDBusArgument QByteArray extraction operator and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting a QByteArray when the value actually is e.g. a struct of mixed types the byte array extraction will crash as it attempts to extract the struct data as a fixed array. The fix adds DBus type checks to QDBusArgument byte array extraction operator implementations. The checks invalidate extracting arrays of other types than bytes to a QByteArray that worked with the unchecked implementation. The rationale for this restriction is 1) extracting a QByteArray to a variant checks already that the array element type is byte 2) Results of extracting arrays of types wider than a byte to a QByteArray are architecture-dependent making such code inherently non-portable. Task-number: QTBUG-22840 Change-Id: Ie20f2adc06c697a68055c803215fb408568fdd90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller QStringList extractionSami Rosendahl2011-12-251-0/+52
| | | | | | | | | | | | | | | | QDBusArgument QStringList extraction operator and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting a QStringList and the value actually is e.g. an array of bytes the string list extraction will crash as it interprets the bytes as char pointers. The fix adds DBus type checks to QDBusArgument QStringList extraction operator implementations. The checks are as permissive as possible provided crashes are avoided. Task-number: QTBUG-22840 Change-Id: I4b67d75b59c5052d939f3a69f3e92dabdb3bdd6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller basic string-like type extractionSami Rosendahl2011-12-251-0/+115
| | | | | | | | | | | | | | | | | | QDBusArgument string extraction operators and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting string-like basic DBus type that actually is e.g. an integer the string extraction will crash as it blindly attempts to use the integer as a pointer to char. The fix adds DBus type checks to QDBusArgument string type extraction operator implementations. The checks are as permissive as possible provided crashes are avoided. Previously supported functionality of extracting an object path or type signature to a string type is retained. Task-number: QTBUG-22840 Change-Id: I29be1ae592658ca268c65ed692e1d42619d52280 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix stack overwrite in QDBusDemarshallerSami Rosendahl2011-11-231-2/+102
| | | | | | | | | | | | | | | | | | | | QDBusArgument extraction operators and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. Helper function template qIterGet in qdbusdemarshaller.cpp that is used for extracting basic data types only reserves space from the stack for the expected type as specified by client. If the actual type in the DBus parameter is larger stack will be overwritten in the helper function by at most 7 bytes (expected one byte, received dbus_uint_64_t of size 8 bytes). The fix always reserves space for the largest basic type dbus_uint64_t readable by dbus_message_iter_get_basic API. See also http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga41c23a05e552d0574d04 Task-number: QTBUG-22735 Change-Id: I9aa25b279852ac8acc40199a39910ea4002042d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qtbase tests: Fix some warningsFriedemann Kleint2011-11-212-3/+3
| | | | | | | | - Fix warnings about QAtomicPointer/Int usage - Fix some gcc 4.6 warnings about assigned/unused variables Change-Id: Ib4dbf9110f0dad93ad48e97278310f05fad3a82a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Re-enabled passing test in tst_qdbuspendingcallSergio Ahumada2011-11-041-2/+0
| | | | | | | | | tst_QDBusPendingCall::watcher_waitForFinished_threaded() autotest was fixed by faa6113c41b81368c5bbc2a764c2ae9bbc42e415 Task-number: QTBUG-20859 Change-Id: I05aaebfde45862836b10700aa7d9c64e4287466f Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix unstable test due to a race in QThreadBradley T. Hughes2011-11-031-1/+1
| | | | | | | | | | | | | QThread::finished() is emitted before setting the thread's state to finished and !running, which means it's possible to receive the finished() signal and act on it while QThread::isRunning() still returns true. This test randomly fails due to this race. Fix it by using checking the return value of QThread::wait() instead. Change-Id: Ibf347fc9a2e8d32b328227ee6978e1129dd781f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove redundant #if 1 from qdbusmarshall testJason McDonald2011-11-021-2/+0
| | | | | Change-Id: I5342210cda1f02950667621e5e64d65d6357c6ce Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove unused code from qdbusmarshall test.Jason McDonald2011-11-021-32/+0
| | | | | | | | The removed functions have been unsued since at least as far back as 2006. Change-Id: Id1ea77dbfffa319c18891968f3aa378cfb563fd4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qdbusmarshall test.Jason McDonald2011-11-021-6/+0
| | | | | | | | The removed code had been disabled since 2007 and tested functionality that was no longer supported. Change-Id: I49dfe58601c1cc6d41590ab2980daba27eca6bfb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qdbuspendingcall testJason McDonald2011-11-021-33/+0
| | | | | | | The tested functionality hasn't been in the public API since 2008. Change-Id: I2898da3730fa6248eea2e19779b33ccc793b7a31 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* all remaining tests: eliminated usage of qttest_p4.prfRohan McGovern2011-10-2521-42/+58
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I02fe27b2c1800f929250fa8694ca2976c9661a12 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-212-3/+3
| | | | | | | | | The previous commit removed SkipMode from the testlib APi. This commit removes the parameter from all calls to QSKIP. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove redundant logic from dbus test .pro files.Jason McDonald2011-10-1120-189/+38
| | | | | | | | | | | | There was logic in .pro files for the dbus tests to omit the body of each test if dbus was not available in the Qt build. This was all redundant however, because tests/auto/auto.pro already excluded all dbus tests if dbus was not available in the Qt build. Change-Id: Iaea06e38622e5227daec4d2e08106c2da3fb4013 Reviewed-on: http://codereview.qt-project.org/6372 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* This passes just fineLars Knoll2011-09-201-1/+0
| | | | | | | | Task-number: QTBUG-21424 Change-Id: Ied95373b2cf3882ec4f352ccbc285b578c66f83d Reviewed-on: http://codereview.qt-project.org/5003 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Temporarily disabled testsHolger Ihrig2011-09-141-0/+1
| | | | | | | | | | | Necessary to avoid CI blocking. The tests should be enabled again as soon as possible. Task-number: QTBUG-21424 Change-Id: Ibc54723855579095be0dea3bd3e071dd22a1fccf Reviewed-on: http://codereview.qt-project.org/4825 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-09-121-0/+3
| | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/gui/text/qfont_qpa.cpp src/gui/widgets/qlinecontrol.cpp src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp tests/auto/gui.pro tests/auto/network.pro tests/auto/qstring/tst_qstring.cpp Change-Id: Id118c172645303ccf06a207050d5bf1462ff57fe
* Moved dbus autotests into new directory structureJo Asplin2011-09-0169-0/+14094
Task-number: QTBUG-21108 Change-Id: I8cdd4af59db3716921e7392379584f349ed29136 Reviewed-on: http://codereview.qt.nokia.com/3602 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>