From 847ca1f9ea3ceed24d78b4bf16b7bd789634e00e Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 9 Apr 2024 05:14:00 -0600 Subject: [PATCH] e2e tests: remove requirement for fuse-overlayfs As of April 2024, it's no longer included in rawhide by default. We could force-install it, but it's 2024 and it seems likely that all systems on which Podman 5 will run will have kernels that support native overlay. I also added two debugging printfs to the 'podman info' test that initially failed on an (unpublished) rawhide VM. Without these printfs it was impossible to diagnose the failure. Updating docs is left as a future exercise. Signed-off-by: Ed Santiago --- test/e2e/info_test.go | 10 ++++++---- test/e2e/run_volume_test.go | 25 ------------------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/test/e2e/info_test.go b/test/e2e/info_test.go index ef009cb22a..56b58aab50 100644 --- a/test/e2e/info_test.go +++ b/test/e2e/info_test.go @@ -83,10 +83,11 @@ var _ = Describe("Podman Info", func() { rootlessStoragePath := `"/tmp/$HOME/$USER/$UID/storage"` driver := `"overlay"` - storageOpt := `"/usr/bin/fuse-overlayfs"` - storageConf := []byte(fmt.Sprintf("[storage]\ndriver=%s\nrootless_storage_path=%s\n[storage.options]\nmount_program=%s", driver, rootlessStoragePath, storageOpt)) + storageConf := []byte(fmt.Sprintf("[storage]\ndriver=%s\nrootless_storage_path=%s\n[storage.options]\n", driver, rootlessStoragePath)) err = os.WriteFile(configPath, storageConf, os.ModePerm) Expect(err).ToNot(HaveOccurred()) + // Failures in this test are impossible to debug without breadcrumbs + GinkgoWriter.Printf("CONTAINERS_STORAGE_CONF=%s:\n%s\n", configPath, storageConf) u, err := user.Current() Expect(err).ToNot(HaveOccurred()) @@ -96,8 +97,9 @@ var _ = Describe("Podman Info", func() { podmanPath := podmanTest.PodmanTest.PodmanBinary cmd := exec.Command(podmanPath, "info", "--format", "{{.Store.GraphRoot -}}") out, err := cmd.CombinedOutput() - Expect(err).ToNot(HaveOccurred()) - Expect(string(out)).To(Equal(expect)) + GinkgoWriter.Printf("Running: podman info --format {{.Store.GraphRoot -}}\nOutput: %s\n", string(out)) + Expect(err).ToNot(HaveOccurred(), "podman info") + Expect(string(out)).To(Equal(expect), "output from podman info") }) It("check RemoteSocket ", func() { diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 8d17f4af63..2cd1881e8e 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -201,11 +201,6 @@ var _ = Describe("Podman run with volumes", func() { if os.Getenv("container") != "" { Skip("Overlay mounts not supported when running in a container") } - if isRootless() { - if _, err := exec.LookPath("fuse-overlayfs"); err != nil { - Skip("Fuse-Overlayfs required for rootless overlay mount test") - } - } mountPath := filepath.Join(podmanTest.TempDir, "secrets") err := os.Mkdir(mountPath, 0755) Expect(err).ToNot(HaveOccurred()) @@ -221,11 +216,6 @@ var _ = Describe("Podman run with volumes", func() { if os.Getenv("container") != "" { Skip("Overlay mounts not supported when running in a container") } - if isRootless() { - if _, err := exec.LookPath("fuse-overlayfs"); err != nil { - Skip("Fuse-Overlayfs required for rootless overlay mount test") - } - } session := podmanTest.Podman([]string{"volume", "create", "myvolume"}) session.WaitWithDefaultTimeout() volName := session.OutputToString() @@ -254,11 +244,6 @@ var _ = Describe("Podman run with volumes", func() { if os.Getenv("container") != "" { Skip("Overlay mounts not supported when running in a container") } - if isRootless() { - if _, err := exec.LookPath("fuse-overlayfs"); err != nil { - Skip("Fuse-Overlayfs required for rootless overlay mount test") - } - } // create persistent upperdir on host upperDir := filepath.Join(tempdir, "upper") @@ -308,11 +293,6 @@ var _ = Describe("Podman run with volumes", func() { if os.Getenv("container") != "" { Skip("Overlay mounts not supported when running in a container") } - if isRootless() { - if _, err := exec.LookPath("fuse-overlayfs"); err != nil { - Skip("Fuse-Overlayfs required for rootless overlay mount test") - } - } // Use bindsource instead of named volume bindSource := filepath.Join(tempdir, "bindsource") @@ -626,11 +606,6 @@ VOLUME /test/`, ALPINE) if os.Getenv("container") != "" { Skip("Overlay mounts not supported when running in a container") } - if isRootless() { - if _, err := exec.LookPath("fuse-overlayfs"); err != nil { - Skip("Fuse-Overlayfs required for rootless overlay mount test") - } - } mountPath := filepath.Join(podmanTest.TempDir, "secrets") err := os.Mkdir(mountPath, 0755) Expect(err).ToNot(HaveOccurred())