On Wed, Oct 09, 2019 at 10:22:57AM +0100, Frediano Ziglio wrote:
> Multiple fixes and automatic test of the device/channel.
> Improve previous series.
> Most fixes came from automatic test.
>
> Changes since v2:
> - update some comments;
> - split one fix into 2.
Acked-by: Victor Toso
Thanks,
>
Using coverage utility exercise more code paths:
- message from channel with wrong type;
- remove message from channel with already removed reader;
- init message from channel (ignored);
- data from devices, ADPU;
- error from device;
- messages split in different ways;
- invalid reader_id values.
Create Smardcard device.
Connect to it and test some messages are parsed and processed
as expected.
Signed-off-by: Frediano Ziglio
Acked-by: Victor Toso
---
server/tests/.gitignore | 1 +
server/tests/Makefile.am | 4 +
server/tests/meson.build | 4 +
server/tests/test-sma
Allows to reuse code for emulating a character device.
It will be used for Smardcard test.
Signed-off-by: Frediano Ziglio
Acked-by: Victor Toso
---
server/tests/Makefile.am | 2 +
server/tests/meson.build | 2 +
server/tests/test-stream-device.c | 224 +
This patch handles the scenario when a single read to guest device
brings multiple requests to be handled. When this happens, we will
iterate till all requests are handled and no more requests can be read
from guest device.
If the remaining buffer contains a full request we don't need to read
othe
Use memmove instead of memcpy as the buffer can overlap if the second
request if bigger than the first.
"buf_pos" points to the point of the buffer after we read, if we want
the first part of the next request is "buf_pos - remaining".
Same consideration setting "buf_pos" for the next iteration.
Si
Multiple fixes and automatic test of the device/channel.
Improve previous series.
Most fixes came from automatic test.
Changes since v2:
- update some comments;
- split one fix into 2.
Frediano Ziglio (5):
smartcard: Fix copying remaining request
smartcard: Fix parsing multiple messages from
Hi,
On Tue, Oct 08, 2019 at 06:39:24PM +0100, Frediano Ziglio wrote:
> Using coverage utility exercise more code paths:
> - message from channel with wrong type;
> - remove message from channel with already removed reader;
> - init message from channel (ignored);
> - data from devices, ADPU;
> - e
On Tue, Oct 08, 2019 at 06:39:23PM +0100, Frediano Ziglio wrote:
> Create Smardcard device.
> Connect to it and test some messages are parsed and processed
> as expected.
>
> Signed-off-by: Frediano Ziglio
Acked-by: Victor Toso
(and keeping ack of 5/7)
> --
> Changes since v1:
> - add more co
Hi,
Code seems fine, I'd change a bit the commit log just to be
straight forward with what this is fixing/improving. I'm
suggesting to split what might be a bugfix but feel free to
correct me if I'm mistaken ;)
On Tue, Oct 08, 2019 at 06:39:21PM +0100, Frediano Ziglio wrote:
> If the server is bu
>
> Allows to reuse code for emulating a character device.
> It will be used for Smardcard test.
>
> Signed-off-by: Frediano Ziglio
> Acked-by: Victor Toso
> ---
> server/tests/Makefile.am | 2 +
> server/tests/meson.build | 2 +
> server/tests/test-stream-device.c | 224
On Tue, Oct 08, 2019 at 06:39:20PM +0100, Frediano Ziglio wrote:
> Avoid client to trigger crash. The value of smartcard_readers_get
> is checked for NULL so returning it it's not an issue.
>
> Signed-off-by: Frediano Ziglio
Nice catch.
Acked-by: Victor Toso
> ---
> server/smartcard.c | 4 +++
On Tue, Oct 08, 2019 at 06:39:19PM +0100, Frediano Ziglio wrote:
> More coherent. Also it's not good for a library to output on
> standard output.
>
> Signed-off-by: Frediano Ziglio
Acked-by: Victor Toso
Out of curiosity, have you hit unexpected messages?
> ---
> server/smartcard-channel-cli
Hi,
On Tue, Oct 08, 2019 at 06:39:18PM +0100, Frediano Ziglio wrote:
> Not used
>
> Signed-off-by: Frediano Ziglio
Yes, these are basically what default implementation does and if
no plans to extend it are in place, removing should be fine
Acked-by: Victor Toso
> ---
> server/smartcard-chan
14 matches
Mail list logo