| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. The writeStarted flag shall be reset to false after bytesWritten() signal
is emitted, but not before it.
2. In case of start of writing from the startAsyncWriteTimer it is necessary
to call the startAsyncWrite() method but not the completeAsyncWrite() method.
It give guarantees to exclude of race condition to multiple call of the
WriteFile twice until the write operation is not completed.
For example, a race condition is watched in case of writing data from the
slots which are connected to the bytesWritten() signal from a device; or to
the timeout() signal from a timer with zero interval. To checking of these
scenarios are added additional autotests.
Tested on Windows 8 with the on-board and USB serial ports, using Qt5.
Task-number: QTBUG-40769
Change-Id: Iedabbf38847debeee795a10fd7a4c54c65d2a338
Reviewed-by: Patrick Noffke <patrick.noffke@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous commit 76f293bfb0fd7bab391f96ac822eacc40e4c5176 with adding of
this test to the benchmarks were hasty.
After all it makes sense to place it to auto tests to have opportunity to
run with others together.
Besides, this test is renamed since it is not a loopback, it is an I/O
test with the synchronous approach.
Change-Id: I043a6e0075561167bb29a59a384554ef98dbbd4a
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case of communication event is triggered in the
waitForBytesWritten() method then necessary to process it with
the _q_completeAsyncCommunication() method, but not with the
_q_completeAsyncRead() method.
Otherwise it leads to false filling of the readBuffer with the
data that were read earlier (or with garbage) which remained in
readChunkBuffer.
The synchronous loopback autotest reproduces a bug without of
this patch.
Tested on Windows 7/8 with the on-board and USB serial ports,
using Qt5.
Task-number: QTBUG-40344
Change-Id: I679109b60f4058c4c6f7e5f02c1f70ba6039d8d8
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The commit 2360c401ae2012ed1b5a2b470a088cbbdb0d7f27 introduced an
regression into waitForReadyRead(). Before this commit each read
transaction was started again until the zero number of bytes will
returns from FIFO. When FIFO is empty, all data has been read, and
only then the waitForReadyRead() return true. I.e. condition
"qint64(readBuffer.size()) != currentReadBufferSize" does not mean
that reading is finished.
But after that commit this condition is incorrect, because now each
read operation started once and can not return zero bytes (in case
the number of read bytes less than ReadChunkSize). Thus it led to
returning of TimeoutError error.
Now, this issue has been fixed. Also is added the set of auto-tests
to testing of the waitForReadyRead() method.
Tested on Windows 7/8 using Qt5 and then Qt4.
Task-number: QTBUG-39314
Change-Id: I8abbf986c2a1cc77af634ddbc1747fb46f416a39
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
| |
Change-Id: I4a6767196d205cf1f0715edfb9ea117a2d7fa5c9
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. The QCOMPARE macro can not make type cast between "int" and
"qint64", though on qt5 there are no problems.
2. The QSKIP macro should accept two input parameters.
Tested build on Lixux 64bit and Windows with Qt4 and then Qt5.
Change-Id: I1f8497201e8d704098faea789bc61829f0d2f9e4
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In qt4 the macro QCOMPARE can not make type cast between "int" and
"qint64", though on qt5 there are no problems.
Tested build on Lixux 64bit with Qt4 and then Qt5.
Change-Id: I258f8ee4d26b65cc81720d66714ef69df23e7266
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
On Windows a test will be skipped since flush() does not work there
Change-Id: Ibda38401aff5f1c50644c6d61f9802217146a4fb
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Commit 7c737e0edcb93585856c65890ef34e5c5a28ee6b introduced
this regression by changing the default baud rate from 0 to 9600.
Change-Id: If20315eb53c3416646541dda82add0f4fc12d4a3
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
|
|
|
|
|
|
|
|
|
| |
Now that the settings detection is removed, it would be better to make this API
deprecate because it does not make much sense anymore. It was a bad idea to add
this, but we cannot remove it for now, hence the obsoletion.
Change-Id: I5e02959cb54281995b911ff0f64bd2fa36b80060
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added two types of tests: the constructing tests and the opening tests.
The construction tests are checking of the getters to return of default values.
Also are checking a correctness work of the constructor of class with different
types of a port name.
The opening tests are checking the open() method with the valid/invalid open
modes and with the valid/invalid port names. The results are compared with the
expected behavior (with the error codes and the return values).
Change-Id: I503adf629cf613844bf9b96d8704ff017ea5fcdb
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
| |
Change-Id: I23025d79468650a62c881d3c8cbedfcb7d039495
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
Change-Id: I406517f216e7c73c20439ca2f9a17e60709ef661
Reviewed-by: Laszlo Papp <lpapp@kde.org>
|