This ensures that there's no garbage data left in the buffer between
packets.
It's not triggering any failure currently because all the tests in
`tests/tracing` produce a single packet.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
{
struct test_platform_ctx * const platform_ctx = (void *) data;
+ memset(barectf_packet_buf(&platform_ctx->ctx), 0,
+ barectf_packet_buf_size(&platform_ctx->ctx));
barectf_default_open_packet(&platform_ctx->ctx);
}
assert(platform_ctx);
buf = malloc(buf_size);
assert(buf);
- memset(buf, 0, buf_size);
platform_ctx->fh = fopen("stream", "wb");
assert(platform_ctx->fh);
barectf_init(&platform_ctx->ctx, buf, buf_size, cbs, platform_ctx);