qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, Mads Ynddal <mads@ynddal.dk>
Subject: Re: [PATCH] scripts: improve error from qemu-trace-stap on missing 'stap'
Date: Wed, 12 Feb 2025 10:06:03 -0500	[thread overview]
Message-ID: <20250212150603.GA202073@fedora> (raw)
In-Reply-To: <20241206114524.1666664-1-berrange@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

On Fri, Dec 06, 2024 at 11:45:24AM +0000, Daniel P. Berrangé wrote:
> If the 'stap' binary is missing in $PATH, a huge trace is thrown
> 
>   $ qemu-trace-stap list /usr/bin/qemu-system-x86_64
>   Traceback (most recent call last):
>   File "/usr/bin/qemu-trace-stap", line 169, in <module>
>   main()
>   File "/usr/bin/qemu-trace-stap", line 165, in main
>   args.func(args)
>   File "/usr/bin/qemu-trace-stap", line 83, in cmd_run
>   subprocess.call(stapargs)
>   File "/usr/lib64/python3.12/subprocess.py", line 389, in call
>   with Popen(*popenargs, **kwargs) as p:
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib64/python3.12/subprocess.py", line 1026, in {}init{}
>   self._execute_child(args, executable, preexec_fn, close_fds,
>   File "/usr/lib64/python3.12/subprocess.py", line 1955, in _execute_child
>   raise child_exception_type(errno_num, err_msg, err_filename)
>   FileNotFoundError: [Errno 2] No such file or directory: 'stap'
> 
> With this change the user now gets
> 
>   $ qemu-trace-stap list /usr/bin/qemu-system-x86_64
>   Unable to find 'stap' in $PATH
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  scripts/qemu-trace-stap | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Thanks, applied to my tracing tree:
https://gitlab.com/stefanha/qemu/commits/tracing

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2025-02-12 15:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 11:45 [PATCH] scripts: improve error from qemu-trace-stap on missing 'stap' Daniel P. Berrangé
2024-12-06 14:40 ` Philippe Mathieu-Daudé
2025-02-12  9:30 ` Daniel P. Berrangé
2025-02-12 15:06 ` Stefan Hajnoczi [this message]

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=20250212150603.GA202073@fedora \
    --to=stefanha@redhat.com \
    --cc=berrange@redhat.com \
    --cc=mads@ynddal.dk \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).