On Mon, Sep 07, 2026 at 06:18:39PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Mon, Sep 7, 2026 at 5:35 PM Michael S. Tsirkin <[email protected]> wrote:
> >
> > On Mon, Sep 07, 2026 at 05:22:43PM +0400, Marc-André Lureau wrote:
> > > > maybe just avoid stdbuf completely.
> > > > i don't remember why we use it, but it looks like merely to
> > > > disable buffering for stdout?
> > > >
> > > > If so:
> > > >
> > > > setvbuf(stdout, NULL, _IONBF, 0);
> > > >
> > > > will do just that with no asan issues.
> > > >
> > >
> > > That requires modifying vhost-user-bridge, not sure that's what we want.
> > >
> > > thanks
> >
> > why not? it's not like it's a facility useful outside of testing qemu.
> > If we were we'd probably disable stdout printout completely.
> 
> Since the test redirects stderr to stdout, I guess the log is
> fully-buffered for stdout and unbuffered for stderr, and we see stderr
> log lines in the file log before the others. If we call
> setvbuf(stdout, NULL, _IONBF, 0) early, we probably will get
> interleaved stream output, but probably broken lines...

We can also just change that macro to write to stderr.

> Tbh, I don't
> have much motivation to check or fix this, I would just like the test
> to be green or skipped when built with ASAN. The current workaround is
> quite ok. If you prefer setvbuf() in vhost-user-bridge.c, I am okay
> too.
> 
> Yodel, wdyt?


Reply via email to