From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Huth <thuth@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: check-functional skipUnless failure
Date: Tue, 10 Sep 2024 13:13:58 +0200 [thread overview]
Message-ID: <79f8ca1e-a626-43e8-8b08-4fb231dca07f@linaro.org> (raw)
In-Reply-To: <b04d662f-0ec1-4c93-a67a-d0e77df271cd@redhat.com>
On 10/9/24 09:36, Thomas Huth wrote:
> On 10/09/2024 08.41, Philippe Mathieu-Daudé wrote:
>>> line 16, in tesseract_available
>>> (stdout, stderr, ret) = run_cmd([ 'tesseract', '--version'])
>>> File "/home/rth/qemu/src/tests/functional/qemu_test/cmd.py", line
>>> 69, in run_cmd
>>> subp = subprocess.Popen(args,
>>> File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
>>> self._execute_child(args, executable, preexec_fn, close_fds,
>>> File "/usr/lib64/python3.9/subprocess.py", line 1837, in
>>> _execute_child
>>> raise child_exception_type(errno_num, err_msg, err_filename)
>>> FileNotFoundError: [Errno 2] No such file or directory: 'tesseract'
>> While looking at this, I'm surprised to notice has_cmd() actually
>> *runs* the command by calling run_cmd(). I'd have expected it solely
>> checks for binary presence and RX perms, avoiding unexpected side
>> effects.
>
> It uses "which" to search for the binary ... that could be done better
> for sure (especially since "which" might not be available on all
> systems), but it already was done this way in the Avocado tests, so at
> least that's not a regression.
Sure, I just wanted to share my surprise before forgetting ;)
next prev parent reply other threads:[~2024-09-10 11:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 3:58 check-functional skipUnless failure Richard Henderson
2024-09-10 6:41 ` Philippe Mathieu-Daudé
2024-09-10 7:36 ` Thomas Huth
2024-09-10 11:13 ` Philippe Mathieu-Daudé [this message]
2024-09-10 11:18 ` Peter Maydell
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=79f8ca1e-a626-43e8-8b08-4fb231dca07f@linaro.org \
--to=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@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).