On Tue, 10 Sept 2024 at 08:37, Thomas Huth <th...@redhat.com> wrote: > > On 10/09/2024 08.41, Philippe Mathieu-Daudé wrote: > > 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.
So it runs an external binary, but it doesn't run the command being searched for; "which" won't have any side effects. -- PMM