From 9a2c84b130d00f0ee53a18f97cd7076726fd7481 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 1 Oct 2026 11:26:01 -0700 Subject: [PATCH] test/e2e: fix podman run with noexec for ubuntu 26.04 Test case bind mounts host's /bin to /hostbin and tries to exec /hostbin/ls, and expects a particular exit code. It does not work on Ubuntu 26.04 because it ships with coreutils-rs by default, in which: /bin/ls -> ../lib/cargo/bin/coreutils/ls and so we get ENOENT instead of EPERM. Fix by replacing ls with true. The funny thing is, it's also a symlink on Ubuntu 26.04: /bin/true -> gnutrue but it works since the destination is in the same directory. (NOTE the whole test relies on the fact that the kernel checks permissions first -- a dynamic binary from a different distro won't be able to run anyway.) Signed-off-by: Kir Kolyshkin --- test/e2e/run_volume_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index 83953487ac..4c7b83a785 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -373,7 +373,7 @@ var _ = Describe("Podman run with volumes", func() { }) It("podman run with noexec can't exec", func() { - session := podmanTest.Podman([]string{"run", "--rm", "-v", "/bin:/hostbin:noexec", ALPINE, "/hostbin/ls", "/"}) + session := podmanTest.Podman([]string{"run", "--rm", "-v", "/bin:/hostbin:noexec", ALPINE, "/hostbin/true"}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError(126, "ermission denied")) })