qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>, Mads Ynddal <mads@ynddal.dk>
Subject: Re: [PATCH] scripts: improve error from qemu-trace-stap on missing 'stap'
Date: Fri, 6 Dec 2024 15:40:12 +0100	[thread overview]
Message-ID: <bdbbdbf5-939f-4f58-8d9c-9e7d38ea0469@linaro.org> (raw)
In-Reply-To: <20241206114524.1666664-1-berrange@redhat.com>

On 6/12/24 12:45, 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(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



  reply	other threads:[~2024-12-06 14:41 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é [this message]
2025-02-12  9:30 ` Daniel P. Berrangé
2025-02-12 15:06 ` Stefan Hajnoczi

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=bdbbdbf5-939f-4f58-8d9c-9e7d38ea0469@linaro.org \
    --to=philmd@linaro.org \
    --cc=berrange@redhat.com \
    --cc=mads@ynddal.dk \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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;
as well as URLs for NNTP newsgroup(s).