tests: fix reading the output of subprocesses
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 21 Jun 2017 08:16:36 +0000 (10:16 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 21 Jun 2017 08:18:06 +0000 (10:18 +0200)
commit8233025854a7a41b47a311dad63d153b64110027
tree7957852abac6720e26d906baf065480c91e71f18
parent2100f6e66a4ad02d0c390a1d3df1c1cb421d3221
tests: fix reading the output of subprocesses

We're currently using vasprintf() internally when reading the output
streams of terminated subprocesses. This routine interprets the buffer
as a printf() format string, so substrings like '%x' get converted
unintentionally.

Instead allocate a big enough buffer and just read the output without
any modifications.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/gpiod-test.c