Files
podman/pkg/machine/e2e
Paul Holzinger 114bb1efa7 machine/wsl: fix config mount logic
The current systemd service to mount /etc/containers is not working
right. The Before=podman.socket causes a ordering conflict which causes
the socket to be disabled and thus all podman remote connections fail.

The problem is the unit is wanted by the default.target while the socket
is wanted by sockets.target which can be before the default.target is
triggered. That means that the Before= line cannot be fulfilled and
sometimes systemd thus seems to not start the socket. It is unclear to
me why this is racy as it is sometimes also works.

This was reported by Vladimir Lazar from the PD team, our CI did not
caught this as we use rootless machines by default and the problem only
happens for the rootful socket so we do not see connection failures.
To fix this add at least one rootful socket check.

We do however have a different CI flake that was also caused by the
incorrect mount dependencies. The mount could happen after sshd or other
programs run. So to fix this we must hook the podman-mnt-config.service
into the local-fs.target which runs much earlier and is used for all the
mounts.

Fixes: #29003

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-07-02 14:01:43 +02:00
..
2025-10-29 07:59:34 -05:00
2025-11-11 12:32:46 +01:00
2025-11-11 12:32:46 +01:00

Running the machine tests

This document is a quick how-to run machine tests. Not all dependencies, like gvproxy are documented. You must install gvproxy in all cases described below.

General notes

Environment must be clean

You must not have any machines defined before running tests. Consider running podman machine reset prior to running tests.

Scoping tests

You can scope tests in the machine suite by adding various incantations of FOCUS=. For example, add FOCUS_FILE=basic_test.go to only run basic test. Or add FOCUS="simple init with start" to only run one test case. For windows, the syntax differs slightly. In windows, executing something like following achieves the same result:

./winmake localmachine "basic_test.go start_test.go"

To focus on one specific test on windows, run ginkgo manually:

$remotetags = "remote exclude_graphdriver_btrfs containers_image_openpgp"
$focus_file = "basic_test.go"
$focus_test = "podman build contexts"
./test/tools/build/ginkgo.exe `
     -v --tags "$remotetags" -timeout=90m --trace --no-color `
     --focus-file  $focus_file `
     --focus "$focus_test" `
     ./pkg/machine/e2e/.

Note that ginkgo.exe is built when running the command winmake.ps1 localmachine so make sure to run it before trying the command above.

Linux

QEMU

  1. make localmachine

Microsoft Windows

Hyper-V

  1. Open a powershell as admin
  2. .\winmake.ps1 podman-remote && .\winmake.ps1 win-gvproxy
  3. $env:CONTAINERS_HELPER_BINARY_DIR="$pwd\bin\windows"
  4. $env:CONTAINERS_MACHINE_PROVIDER="hyperv"
  5. .\winmake localmachine

WSL

  1. Open a powershell as a regular user
  2. .\winmake.ps1 podman-remote && .\winmake.ps1 win-gvproxy
  3. $env:CONTAINERS_HELPER_BINARY_DIR="$pwd\bin\windows"
  4. $env:CONTAINERS_MACHINE_PROVIDER="wsl"
  5. .\winmake localmachine

MacOS

Macs now support two different machine providers: applehv and libkrun. The libkrun provider is the default.

Note: On macOS, an error will occur if the path length of $TMPDIR is longer than 22 characters. Please set the appropriate path to $TMPDIR. Also, if $TMPDIR is empty, /private/tmp will be set.

Apple Hypervisor

  1. brew install vfkit
  2. make podman-remote
  3. export CONTAINERS_MACHINE_PROVIDER="applehv"
  4. make localmachine

Libkrun

  1. brew install krunkit
  2. make podman-remote
  3. make localmachine