mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-23 06:17:37 +00:00
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 <kolyshkin@gmail.com>
This commit is contained in:
parent
ccc1e20775
commit
9a2c84b130
1 changed files with 1 additions and 1 deletions
|
|
@ -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"))
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue