oktetlabs / test-environment

OKTET Labs Test Environment
Other
5 stars 9 forks source link

engine/logger: avoid repeating output in tee #31

Closed okt-galaktionov closed 10 months ago

okt-galaktionov commented 10 months ago

Limit the size of data appended to the "buffer string" by the length of the data chunk actually read from the child process to avoid various memory-related errors. The most common is repeating output because of the lack of null terminator in the original buffer.

Fixes: 1755a582f069 ("engine/logger: use new method to parse logs in TE tee")

Testing done: tested manually with dpdk-ethdev-ts, EAL logs no longer contain "leftovers" from previous reads