From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, "Brian Cain" <brian.cain@oss.qualcomm.com>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
qemu-arm@nongnu.org, "Ani Sinha" <anisinha@redhat.com>,
"Gerd Hoffman" <kraxel@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>,
"Jared Rossi" <jrossi@linux.ibm.com>,
"Zhuoying Cai" <zycai@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Jason Herne" <jjherne@linux.ibm.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Ilya Leoshkevich" <iii@linux.ibm.com>,
"David Hildenbrand" <david@kernel.org>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Eric Farman" <farman@linux.ibm.com>,
"Matthew Rosato" <mjrosato@linux.ibm.com>,
"Cornelia Huck" <cohuck@redhat.com>,
qemu-s390x@nongnu.org
Subject: Re: [PATCH 2/9] tests/test_vhost_user_bridge: skip when running ASAN
Date: Mon, 7 Sep 2026 08:02:19 -0400 [thread overview]
Message-ID: <20260907075640-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260906-nohmp-next-v1-2-2b21e63974f3@redhat.com>
does not look like this patch skips any tests?
On Sun, Sep 06, 2026 at 12:53:34PM +0400, Marc-André Lureau wrote:
> Running vhost-user-bridge built with ASAN with stdbuf dies:
> ==2431898==ASan runtime does not come first in initial library list; you
> should either link runtime to your application or manually preload it
> with LD_PRELOAD.
so it dies but why? judging by below because of stdbuf?
pls describe the fix not just the problem.
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> tests/functional/x86_64/test_vhost_user_bridge.py | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/tests/functional/x86_64/test_vhost_user_bridge.py b/tests/functional/x86_64/test_vhost_user_bridge.py
> index c36c62542053..5fedf61c5e72 100755
> --- a/tests/functional/x86_64/test_vhost_user_bridge.py
> +++ b/tests/functional/x86_64/test_vhost_user_bridge.py
> @@ -73,12 +73,25 @@ def configure_vm(self, ud_socket_path, lport, rport, hostfwd_port, tftpdir):
> "-netdev", "hubport,id=hub1,hubid=0,netdev=user0"
> )
>
> + @staticmethod
> + def _is_asan_linked(binary_path):
> + try:
> + output = subprocess.check_output(
> + ["ldd", binary_path], stderr=subprocess.DEVNULL, text=True)
> + return "libasan" in output
this is quite a hack
> + except (subprocess.CalledProcessError, FileNotFoundError):
> + return False
> +
> 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")
> + elif self._is_asan_linked(vubr_path):
> + self.log.info("vhost-user-bridge is ASan-linked: skipping "
> + "stdbuf to avoid LD_PRELOAD conflict, "
> + "log lines may appear out of order")
> else:
> vubr_args += [stdbuf_path, "-o0", "-e0"]
>
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.
> --
> 2.55.0.543.g5ebe2ebe4ea8
>
>
next prev parent reply other threads:[~2026-09-07 12:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 8:53 [PATCH 0/9] Various ASAN & tests fixes Marc-André Lureau
2026-09-06 8:53 ` [PATCH 1/9] tests: fix qemu:func-hexagon-linters Marc-André Lureau
2026-09-06 22:30 ` Brian Cain
2026-09-06 8:53 ` [PATCH 2/9] tests/test_vhost_user_bridge: skip when running ASAN Marc-André Lureau
2026-09-07 12:02 ` Michael S. Tsirkin [this message]
2026-09-07 13:22 ` Marc-André Lureau
2026-09-07 13:34 ` Michael S. Tsirkin
2026-09-06 8:53 ` [PATCH 3/9] hw/misc/bcm2835_powermgt: free wdog timer on finalize Marc-André Lureau
2026-09-06 8:53 ` [PATCH 4/9] tests/launchupdate-test: correct g_auto usage Marc-André Lureau
2026-09-06 8:53 ` [PATCH 5/9] tests/launchupdate-test: correctly release qs Marc-André Lureau
2026-09-06 8:53 ` [PATCH 6/9] tests/launchupdate-test: fix fw_cfg leak Marc-André Lureau
2026-09-06 8:53 ` [PATCH 7/9] igvm: release found memory region on success Marc-André Lureau
2026-09-06 8:53 ` [PATCH 8/9] igvm: make IgvmMemoryRegion a QOM Marc-André Lureau
2026-09-06 8:53 ` [PATCH 9/9] hw/s390x/ipl: fix short SCSI loadparm buffer over-read Marc-André Lureau
2026-09-08 13:55 ` Jared Rossi
2026-09-09 0:03 ` Eric Farman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260907075640-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=anisinha@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=brian.cain@oss.qualcomm.com \
--cc=cohuck@redhat.com \
--cc=david@kernel.org \
--cc=farman@linux.ibm.com \
--cc=farosas@suse.de \
--cc=iii@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=jrossi@linux.ibm.com \
--cc=kraxel@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sgarzare@redhat.com \
--cc=zhao1.liu@intel.com \
--cc=zycai@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox