All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction
@ 2026-09-14 16:52 Yodel Eldar
  2026-09-14 16:52 ` [PATCH 1/2] contrib/vhost-user-bridge: Use stderr for debug output Yodel Eldar
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Yodel Eldar @ 2026-09-14 16:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Michael S . Tsirkin, Yodel Eldar

From: Yodel Eldar <yodel.eldar@yodel.dev>

Hi,

As reported by Marc-André in (1), the functional test of
vhost-user-bridge (vubr) encounters a runtime error when
vubr is built with ASAN, because the "ASan runtime does
not come first in initial library list."

Upon Michael's suggestion, this series converts the DPRINT
debug output macro in vubr to use stderr instead of stdout
for output. With that change, the functional test no longer
needs to invoke stdbuf, so it is removed.

Thanks,
Yodel

(1) https://lore.kernel.org/qemu-devel/20260906-nohmp-next-v1-2-2b21e63974f3@redhat.com/

Yodel Eldar (2):
  contrib/vhost-user-bridge: Use stderr for debug output
  tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage

 contrib/vhost-user-bridge/vhost-user-bridge.c     | 2 +-
 tests/functional/x86_64/test_vhost_user_bridge.py | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

-- 
2.55.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] contrib/vhost-user-bridge: Use stderr for debug output
  2026-09-14 16:52 [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Yodel Eldar
@ 2026-09-14 16:52 ` Yodel Eldar
  2026-09-14 16:52 ` [PATCH 2/2] tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage Yodel Eldar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Yodel Eldar @ 2026-09-14 16:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Michael S . Tsirkin, Yodel Eldar

From: Yodel Eldar <yodel.eldar@yodel.dev>

Since vhost-user-bridge is solely used for testing, and
logging to stderr ensures proper interleaving of debug
output in automated testing, modify the DPRINT macro to
write to stderr instead of stdout.

Message ID of relevant thread:
<20260906-nohmp-next-v1-2-2b21e63974f3@redhat.com>

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
---
 contrib/vhost-user-bridge/vhost-user-bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/vhost-user-bridge/vhost-user-bridge.c b/contrib/vhost-user-bridge/vhost-user-bridge.c
index 3f0fd0fa49..a6f7ec226c 100644
--- a/contrib/vhost-user-bridge/vhost-user-bridge.c
+++ b/contrib/vhost-user-bridge/vhost-user-bridge.c
@@ -41,7 +41,7 @@
 #define DPRINT(...) \
     do { \
         if (VHOST_USER_BRIDGE_DEBUG) { \
-            printf(__VA_ARGS__); \
+            fprintf(stderr, __VA_ARGS__); \
         } \
     } while (0)
 
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage
  2026-09-14 16:52 [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Yodel Eldar
  2026-09-14 16:52 ` [PATCH 1/2] contrib/vhost-user-bridge: Use stderr for debug output Yodel Eldar
@ 2026-09-14 16:52 ` Yodel Eldar
  2026-09-14 18:00 ` [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Marc-André Lureau
  2026-09-21 17:57 ` Yodel Eldar
  3 siblings, 0 replies; 6+ messages in thread
From: Yodel Eldar @ 2026-09-14 16:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Michael S . Tsirkin, Yodel Eldar

From: Yodel Eldar <yodel.eldar@yodel.dev>

Usage of stdbuf triggers a runtime error when vhost-user-bridge
is built with ASAN. Now that vhost-user-bridge writes debug
output to stderr, stdbuf is obviated; remove its invocation.

Message ID of relevant thread:
<20260906-nohmp-next-v1-2-2b21e63974f3@redhat.com>

Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
---
 tests/functional/x86_64/test_vhost_user_bridge.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/functional/x86_64/test_vhost_user_bridge.py b/tests/functional/x86_64/test_vhost_user_bridge.py
index c36c625420..5e1db48884 100755
--- a/tests/functional/x86_64/test_vhost_user_bridge.py
+++ b/tests/functional/x86_64/test_vhost_user_bridge.py
@@ -76,12 +76,6 @@ def configure_vm(self, ud_socket_path, lport, rport, hostfwd_port, tftpdir):
     def assemble_vubr_args(self, vubr_path, ud_socket_path, lport, rport):
         vubr_args = []
 
-        if (stdbuf_path := which("stdbuf")) is None:
-            self.log.info("Could not find stdbuf: vhost-user-bridge "
-                          "log lines may appear out of order")
-        else:
-            vubr_args += [stdbuf_path, "-o0", "-e0"]
-
         vubr_args += [vubr_path, "-u", f"{ud_socket_path}",
                       "-l", f"127.0.0.1:{lport}", "-r", f"127.0.0.1:{rport}"]
 
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction
  2026-09-14 16:52 [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Yodel Eldar
  2026-09-14 16:52 ` [PATCH 1/2] contrib/vhost-user-bridge: Use stderr for debug output Yodel Eldar
  2026-09-14 16:52 ` [PATCH 2/2] tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage Yodel Eldar
@ 2026-09-14 18:00 ` Marc-André Lureau
  2026-09-21 17:57 ` Yodel Eldar
  3 siblings, 0 replies; 6+ messages in thread
From: Marc-André Lureau @ 2026-09-14 18:00 UTC (permalink / raw)
  To: Yodel Eldar; +Cc: qemu-devel, Michael S . Tsirkin

On Mon, Sep 14, 2026 at 8:55 PM Yodel Eldar <yodel.eldar@yodel.dev> wrote:
>
> From: Yodel Eldar <yodel.eldar@yodel.dev>
>
> Hi,
>
> As reported by Marc-André in (1), the functional test of
> vhost-user-bridge (vubr) encounters a runtime error when
> vubr is built with ASAN, because the "ASan runtime does
> not come first in initial library list."
>
> Upon Michael's suggestion, this series converts the DPRINT
> debug output macro in vubr to use stderr instead of stdout
> for output. With that change, the functional test no longer
> needs to invoke stdbuf, so it is removed.
>
> Thanks,
> Yodel
>
> (1) https://lore.kernel.org/qemu-devel/20260906-nohmp-next-v1-2-2b21e63974f3@redhat.com/
>
> Yodel Eldar (2):
>   contrib/vhost-user-bridge: Use stderr for debug output
>   tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage
>
>  contrib/vhost-user-bridge/vhost-user-bridge.c     | 2 +-
>  tests/functional/x86_64/test_vhost_user_bridge.py | 6 ------
>  2 files changed, 1 insertion(+), 7 deletions(-)
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

thanks

> --
> 2.55.0
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction
  2026-09-14 16:52 [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Yodel Eldar
                   ` (2 preceding siblings ...)
  2026-09-14 18:00 ` [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Marc-André Lureau
@ 2026-09-21 17:57 ` Yodel Eldar
  2026-09-21 19:37   ` Michael S. Tsirkin
  3 siblings, 1 reply; 6+ messages in thread
From: Yodel Eldar @ 2026-09-21 17:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Michael S . Tsirkin

Hi,

On 14/09/2026 11:52, Yodel Eldar wrote:
> From: Yodel Eldar <yodel.eldar@yodel.dev>
> 
> Hi,
> 
> As reported by Marc-André in (1), the functional test of
> vhost-user-bridge (vubr) encounters a runtime error when
> vubr is built with ASAN, because the "ASan runtime does
> not come first in initial library list."
> 
> Upon Michael's suggestion, this series converts the DPRINT
> debug output macro in vubr to use stderr instead of stdout
> for output. With that change, the functional test no longer
> needs to invoke stdbuf, so it is removed.
> 
> Thanks,
> Yodel
> 
> (1) https://lore.kernel.org/qemu-devel/20260906-nohmp-next-v1-2-2b21e63974f3@redhat.com/
> 
> Yodel Eldar (2):
>    contrib/vhost-user-bridge: Use stderr for debug output
>    tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage
> 
>   contrib/vhost-user-bridge/vhost-user-bridge.c     | 2 +-
>   tests/functional/x86_64/test_vhost_user_bridge.py | 6 ------
>   2 files changed, 1 insertion(+), 7 deletions(-)
> 

Ping?

Note: Series is fully reviewed (thanks Marc-André).

Link:
https://lore.kernel.org/qemu-devel/20260914165250.88382-1-yodel.eldar@yodel.dev/

Thanks,
Yodel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction
  2026-09-21 17:57 ` Yodel Eldar
@ 2026-09-21 19:37   ` Michael S. Tsirkin
  0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Tsirkin @ 2026-09-21 19:37 UTC (permalink / raw)
  To: Yodel Eldar; +Cc: qemu-devel, Marc-André Lureau

On Mon, Sep 21, 2026 at 12:57:30PM -0500, Yodel Eldar wrote:
> Hi,
> 
> On 14/09/2026 11:52, Yodel Eldar wrote:
> > From: Yodel Eldar <yodel.eldar@yodel.dev>
> > 
> > Hi,
> > 
> > As reported by Marc-André in (1), the functional test of
> > vhost-user-bridge (vubr) encounters a runtime error when
> > vubr is built with ASAN, because the "ASan runtime does
> > not come first in initial library list."
> > 
> > Upon Michael's suggestion, this series converts the DPRINT
> > debug output macro in vubr to use stderr instead of stdout
> > for output. With that change, the functional test no longer
> > needs to invoke stdbuf, so it is removed.
> > 
> > Thanks,
> > Yodel
> > 
> > (1) https://lore.kernel.org/qemu-devel/20260906-nohmp-next-v1-2-2b21e63974f3@redhat.com/
> > 
> > Yodel Eldar (2):
> >    contrib/vhost-user-bridge: Use stderr for debug output
> >    tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage
> > 
> >   contrib/vhost-user-bridge/vhost-user-bridge.c     | 2 +-
> >   tests/functional/x86_64/test_vhost_user_bridge.py | 6 ------
> >   2 files changed, 1 insertion(+), 7 deletions(-)
> > 
> 
> Ping?
> 
> Note: Series is fully reviewed (thanks Marc-André).
> 
> Link:
> https://lore.kernel.org/qemu-devel/20260914165250.88382-1-yodel.eldar@yodel.dev/
> 
> Thanks,
> Yodel

Hi!
Review delayed due to lots of holidays. I'll get back on the
treadmill beginning of Oct. Sorry.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-21 19:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 16:52 [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Yodel Eldar
2026-09-14 16:52 ` [PATCH 1/2] contrib/vhost-user-bridge: Use stderr for debug output Yodel Eldar
2026-09-14 16:52 ` [PATCH 2/2] tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage Yodel Eldar
2026-09-14 18:00 ` [PATCH 0/2] vhost-user-bridge: Fix stdbuf and ASAN interaction Marc-André Lureau
2026-09-21 17:57 ` Yodel Eldar
2026-09-21 19:37   ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.