qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] scripts: improve error from qemu-trace-stap on missing 'stap


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] scripts: improve error from qemu-trace-stap on missing 'stap'
Date: Fri, 6 Dec 2024 15:40:12 +0100
User-agent: Mozilla Thunderbird

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 via email to

[Prev in Thread] Current Thread [Next in Thread]