podman icon indicating copy to clipboard operation
podman copied to clipboard

Change tmpDir when running e2e localmachine test on macOS

Open tnk4on opened this issue 2 years ago • 7 comments

Fix https://github.com/containers/podman/issues/22360

Does this PR introduce a user-facing change?

Fixed an error starting Podman machine when running e2e localmachine tests on macOS.

The fixes are only to the e2e test file and Doc, no additional tests.

tnk4on avatar Apr 12 '24 14:04 tnk4on

Ephemeral COPR build failed. @containers/packit-build please check.

Ephemeral COPR build failed. @containers/packit-build please check.

@ashley-cui I think the macOS CI Fail is another cause as it was happening with other PRs. The podman machine actually started without timeout until halfway through.

I added code to check $TMPDIR. Please check.

tnk4on avatar Apr 16 '24 03:04 tnk4on

LGTM, restarted flaking tests, thanks!

ashley-cui avatar Apr 16 '24 17:04 ashley-cui

Please rebase to pick up the bud test fail, thanks!

@containers/podman-maintainers PTAL

ashley-cui avatar Apr 17 '24 15:04 ashley-cui

@ashley-cui I added some code. Please check.

If TMPDIR=“”, it cannot connect to gvproxy.sock.

  > Enter [It] Volume ops - /Users/shtanaka/dev2/podman/pkg/machine/e2e/basic_test.go:73 @ 05/01/24 09:53:43.085
  /Users/shtanaka/dev2/podman/bin/darwin/podman machine init --disk-size 11 --image /private/tmp/podman_test234588004/podman-machine-daily.aarch64.applehv.raw --now 7f8b5007b0ea
  Machine init complete
  Starting machine "7f8b5007b0ea"
  Error: unable to connect to "gvproxy" socket at "podman/7f8b5007b0ea-gvproxy.sock"
  [FAILED] Expected
      <int>: 125
  to match exit code:
      <int>: 0
  In [It] at: /Users/shtanaka/dev2/podman/pkg/machine/e2e/basic_test.go:95 @ 05/01/24 09:54:26.226

so I changed it to return an error.

Also, if TMPDIR is a directory that is not mounted on the podman machine, the bind mount test (e.g. "Volume ops". at basic_test.go) will return an error. Therefore, added check if TMPDIR is included in Machine.Volumes.

tnk4on avatar May 01 '24 01:05 tnk4on

LGTM @containers/podman-maintainers PTAL

ashley-cui avatar May 15 '24 21:05 ashley-cui

/approve /lgtm Thanks @tnk4on

rhatdan avatar May 16 '24 18:05 rhatdan

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, tnk4on

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar May 16 '24 18:05 openshift-ci[bot]