tests: add test with incomplete packet header
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 15 Aug 2022 18:02:39 +0000 (14:02 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 23 Aug 2022 16:06:16 +0000 (12:06 -0400)
commit45ce3f91f3d6f4a9bab0729d1e3d4da7a6757741
treeefcd7dbaa06cb62c88b3102775c2c597a4722ae9
parentbf16d61fd49f996d038d3a4f0055f3d0fab7818a
tests: add test with incomplete packet header

During developement we hit a problem where src.ctf.fs's medium returned
less data than the `minSize` parameter, when reading a faulty trace.
The trace added in this patch reproduces the problem.  It consists of a
full packet, followed by a single byte.  When trying to read a second
packet, the ItemSeqIter instance would ask the medium for at least two
bytes, but the medium would return a buffer with a single byte (the data
available until the end of file).  The fix was to make the medium
generate an error in this case.

Change-Id: I9a79360b18091f517846ca2be94fbf10fb9af349
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
tests/data/ctf-traces/1/fail/incomplete-packet-header/metadata [new file with mode: 0644]
tests/data/ctf-traces/1/fail/incomplete-packet-header/stream [new file with mode: 0644]
tests/plugins/src.ctf.fs/fail/test_fail
This page took 0.025689 seconds and 5 git commands to generate.