All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v2] tests/docker: ensure container command is probed at most once
Date: Wed, 15 Jul 2026 17:16:26 +0100	[thread overview]
Message-ID: <aleyWsC-JqqnIV8k@redhat.com> (raw)
In-Reply-To: <e3932087-16c8-4e34-98cf-c20cf7db9531@oss.qualcomm.com>

On Wed, Jul 15, 2026 at 09:07:18AM -0700, Pierrick Bouvier wrote:
> On 7/15/2026 3:42 AM, Daniel P. Berrangé wrote:
> > The '--engine' arg accepts either 'podman' or 'docker', which is
> > not sufficiently granular to map directly to a command. This
> > means that  docker.py still has to then probe the exact command
> > to use.
> > 
> > Meanwhile the 'probe' command prints out the full command to use
> > but this cannot be passed back to docker.py to avoid probing
> > again, so the caching is only useful in the few case where we
> > run a container directly bypassing docker.py.
> > 
> > Address this by replacing --engine with --command for docker.py.
> > 
> > This in turn requires the --container-engine configure arg to be
> > replaced with --container-command.
> > 
> > With these changes the container command is probed at most once
> > during configure and never again, while running in an unconfigured
> > tree will still probe on demand.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > 
> > In v2:
> > 
> >  * Don't set container_command to "no" if 'probe' finds
> >    not viable binaries.
> > 
> >  configure                     | 25 +++++++------
> >  tests/docker/Makefile.include | 13 ++++---
> >  tests/docker/docker.py        | 67 ++++++++++++-----------------------
> >  3 files changed, 40 insertions(+), 65 deletions(-)


> 
> I still observe the same error when running make-tcg without
> podman/docker installed.
> bash: line 1: no: command not found
> 
> And I will suggest again to include in your series:
> https://lore.kernel.org/qemu-devel/20260710214343.2065491-27-pierrick.bouvier@oss.qualcomm.com/
> and detect if probe command worked or failed, and adapt behavior based
> on it. Existing behavior to compare to a string "no" is a very
> unfamiliar pattern for any command. `which` does not return no for instance.

That didn't do anything for me when I tested it, and this current
patch did fix the problem. Are you testing on top of a vanilla
git master, or did you have other patches that aren't merged
upstream.

When /usr/bin/podman was absent

 $ ./configure --target-list=s390x-linux-user
 ...
 $ grep CONTAINER build/config-host.mak 
 <no match>
 
 $ make run-tcg-tests-s390x-linux-user
  changing dir to build for make "run-tcg-tests-s390x-linux-user"...
  make[1]: Entering directory '/home/berrange/src/virt/qemu/build'
  ninja: no work to do.
  /home/berrange/src/virt/qemu/build/pyvenv/bin/meson introspect --targets --tests --benchmarks | /home/berrange/src/virt/qemu/build/pyvenv/bin/python3 -B scripts/mtest2make.py > Makefile.mtest
  make[1]: *** No rule to make target 'run-tcg-tests-s390x-linux-user'.  Stop.

configure has correctly skipped setup of the tcg cross
compiler targets.

When /usr/bin/podman was re-instaled it once again
worked


  $ ./configure --target-list=s390x-linux-user
  ...
  $ grep CONTAINER build/config-host.mak 
  CONTAINER_COMMAND=podman

  $ make run-tcg-tests-s390x-linux-user
  changing dir to build for make "run-tcg-tests-s390x-linux-user"...
  make[1]: Entering directory '/home/berrange/src/virt/qemu/build'
  ninja: no work to do.
  /home/berrange/src/virt/qemu/build/pyvenv/bin/meson introspect --targets --tests --benchmarks | /home/berrange/src/virt/qemu/build/pyvenv/bin/python3 -B scripts/mtest2make.py > Makefile.mtest
    BUILD   debian-s390x-cross
    BUILD   s390x-linux-user guest-tests
  tests/tcg/s390x-linux-user: -march=z14 detected
  tests/tcg/s390x-linux-user: -march=z15 detected
  ...tests running...

> You can test next patch using podman (which it seems you have):
> ```
> podman build \
> -f tests/docker/dockerfiles/debian-all-test-cross.docker -t all
> podman run -it --rm all -w $(pwd) -v $(pwd):$(pwd) all \
> bash -c "./configure && cd build && make all -j32 &&make check-tcg -j32"
> ```

I've run 'make check-tcg' and it correctly skips all tests when
podman is absent

  $ make check-tcg
  changing dir to build for make "check-tcg"...
  make[1]: Entering directory '/home/berrange/src/virt/qemu/build'
  make[1]: Nothing to be done for 'check-tcg'.
  make[1]: Leaving directory '/home/berrange/src/virt/qemu/build'


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-07-15 16:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 10:42 [PATCH v2] tests/docker: ensure container command is probed at most once Daniel P. Berrangé
2026-07-15 16:07 ` Pierrick Bouvier
2026-07-15 16:16   ` Daniel P. Berrangé [this message]
2026-07-15 16:22     ` Pierrick Bouvier
2026-07-15 16:31       ` Daniel P. Berrangé
2026-07-15 16:40         ` Pierrick Bouvier

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=aleyWsC-JqqnIV8k@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.