On Fri, Aug 23, 2019 at 12:17:03PM +0200, Patrick Steinhardt wrote: > The tests in libfdisk/mkpart-full all rely on the buffering behaviour of > standard output and standard error streams, most importantly that stderr > is non-buffering and stdout is buffering. This doesn't hold on all libc > implementations when redirecting to a file, breaking the test suite on > such platforms. > > Use the ts_unbuffered function to stop buffering of the standard output > stream to fix this. We have function ts_run. For now it's used only for some library tests where we want to detect leaks, etc. It seems that growing number of situations when we need some extra setting before the exec. May be we can make this function more generic, add buffering control and use in all tests. Something like ts_run leak unbuf -- $TESTPROG # ASAN & unbuffered exec ts_run unbuf -- $TESTPROG # unbuffered exec ts_run -- $TESTPROG # just exec ... or so ;-) Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com