diff --git a/test/e2e/container_inspect_test.go b/test/e2e/container_inspect_test.go index f0d2af040f..0abca8e442 100644 --- a/test/e2e/container_inspect_test.go +++ b/test/e2e/container_inspect_test.go @@ -63,8 +63,9 @@ var _ = Describe("Podman container inspect", func() { }) It("podman inspect exposed ports includes published ports", func() { + hostPort := GetPort() c1 := "ctr1" - c1s := podmanTest.Podman([]string{"run", "-d", "--expose", "22/tcp", "-p", "8080:80/tcp", "--name", c1, ALPINE, "top"}) + c1s := podmanTest.Podman([]string{"run", "-d", "--expose", "22/tcp", "-p", fmt.Sprintf("%d:80/tcp", hostPort), "--name", c1, ALPINE, "top"}) c1s.WaitWithDefaultTimeout() Expect(c1s).Should(ExitCleanly()) diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go index 0872244836..ea20cf4527 100644 --- a/test/e2e/network_create_test.go +++ b/test/e2e/network_create_test.go @@ -22,7 +22,7 @@ func removeNetworkDevice(name string) { var _ = Describe("Podman network create", func() { It("podman network create with name and subnet", func() { netName := "subnet-" + stringid.GenerateRandomID() - nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/24", "--ip-range", "10.11.12.0/26", netName}) + nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.17.0/24", "--ip-range", "10.11.17.0/26", netName}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName) Expect(nc).Should(ExitCleanly()) @@ -33,11 +33,11 @@ var _ = Describe("Podman network create", func() { result := results[0] Expect(result).To(HaveField("Name", netName)) Expect(result.Subnets).To(HaveLen(1)) - Expect(result.Subnets[0].Subnet.String()).To(Equal("10.11.12.0/24")) - Expect(result.Subnets[0].Gateway.String()).To(Equal("10.11.12.1")) + Expect(result.Subnets[0].Subnet.String()).To(Equal("10.11.17.0/24")) + Expect(result.Subnets[0].Gateway.String()).To(Equal("10.11.17.1")) Expect(result.Subnets[0].LeaseRange).ToNot(BeNil()) - Expect(result.Subnets[0].LeaseRange.StartIP.String()).To(Equal("10.11.12.1")) - Expect(result.Subnets[0].LeaseRange.EndIP.String()).To(Equal("10.11.12.63")) + Expect(result.Subnets[0].LeaseRange.StartIP.String()).To(Equal("10.11.17.1")) + Expect(result.Subnets[0].LeaseRange.EndIP.String()).To(Equal("10.11.17.63")) // Once a container executes a new network, the nic will be created. We should clean those up // best we can @@ -47,7 +47,7 @@ var _ = Describe("Podman network create", func() { try.WaitWithDefaultTimeout() Expect(try).To(ExitCleanly()) - _, subnet, err := net.ParseCIDR("10.11.12.0/24") + _, subnet, err := net.ParseCIDR("10.11.17.0/24") Expect(err).ToNot(HaveOccurred()) // Note this is an IPv4 test only! containerIP, _, err := net.ParseCIDR(try.OutputToString()) @@ -391,9 +391,9 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with invalid gateway for subnet", func() { - nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/24", "--gateway", "192.168.1.1", stringid.GenerateRandomID()}) + nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.15.0/24", "--gateway", "192.168.1.1", stringid.GenerateRandomID()}) nc.WaitWithDefaultTimeout() - Expect(nc).To(ExitWithError(125, "gateway 192.168.1.1 not in subnet 10.11.12.0/24")) + Expect(nc).To(ExitWithError(125, "gateway 192.168.1.1 not in subnet 10.11.15.0/24")) }) It("podman network create two networks with same name should fail", func() { diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index ab85888d66..879b1b9fa5 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -2331,6 +2331,8 @@ WORKDIR /madethis`, BB) }) It("podman run --shm-size-systemd", func() { + // I can reproduce this locally with sudo make localintegration FOCUS="podman run --shm-size-systemd" + SkipIfNotRootless("FIXME: This fails with 'Failed to set RLIMIT_CORE: Operation not permitted' printed in the container logs") ctrName := "testShmSizeSystemd" run := podmanTest.Podman([]string{"run", "--name", ctrName, "--shm-size-systemd", "10mb", "-d", SYSTEMD_IMAGE, "/sbin/init"}) run.WaitWithDefaultTimeout() diff --git a/test/e2e/system_connection_test.go b/test/e2e/system_connection_test.go index 1526cdca8d..d4241a047d 100644 --- a/test/e2e/system_connection_test.go +++ b/test/e2e/system_connection_test.go @@ -510,6 +510,7 @@ qe ssh://root@podman.test:2222/run/podman/podman.sock ~/.ssh/id_rsa false true var u *user.User BeforeAll(func() { + Skip("FIXME: test assumes local ssh key is setup for the own user") // These tests are unique in as much as they require podman, podman-remote, systemd and sshd. // podman-remote commands will be executed by ginkgo directly. SkipIfContainerized("sshd is not available when running in a container") diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 158b865863..a3bc64fa87 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -393,7 +393,7 @@ EOF tests=" | /home/podman /home/podman /home/podman | no vol mount /home/x$whoami | /home/podman /home/podman /home/podman | bad vol mount -/home/$whoami | /home/podman /home/$whoami /home/$whoami | vol mount +$HOME | /home/podman $HOME $HOME | vol mount " while read vol expect name; do opts= diff --git a/test/system/050-stop.bats b/test/system/050-stop.bats index 59c4576e1f..032c6b293d 100644 --- a/test/system/050-stop.bats +++ b/test/system/050-stop.bats @@ -198,9 +198,7 @@ load helpers sleep 0.5 done - # Other commands can acquire the lock - run_podman ps -a - + # This command must be able to take the container lock. # The container state transitioned to "stopping" run_podman inspect --format '{{.State.Status}}' $ctrname is "$output" "stopping" "Status of container should be 'stopping'" diff --git a/test/system/080-pause.bats b/test/system/080-pause.bats index 7ce8e9b5ce..8dc18648c1 100644 --- a/test/system/080-pause.bats +++ b/test/system/080-pause.bats @@ -6,7 +6,9 @@ load helpers load helpers.systemd -# bats test_tags=ci:parallel +# SHOULD NOT BE PARALLELIZED! The use of podman ps -a makes it timing sensitive +# as this command takes locks of all containers and parallel containers may +# block for a while. @test "podman pause/unpause" { if is_rootless && ! is_cgroupsv2; then skip "'podman pause' (rootless) only works with cgroups v2" diff --git a/test/system/220-healthcheck.bats b/test/system/220-healthcheck.bats index 6d1bb121b1..d5a3d23e5e 100644 --- a/test/system/220-healthcheck.bats +++ b/test/system/220-healthcheck.bats @@ -430,7 +430,7 @@ function _check_health_log { hcStatus=$PODMAN_TMPDIR/hcStatus run_podman run -d --name $ctr \ - --health-cmd "sleep 20; echo $msg" \ + --health-cmd "touch /tmp/abc; sleep 20; echo $msg" \ $IMAGE /home/podman/pause timeout --foreground -v --kill=10 60 \ @@ -440,6 +440,24 @@ function _check_health_log { run_podman inspect $ctr --format "{{.State.Status}}" assert "$output" == "running" "Container is running" + ### Flake, sometimes it is possible that the background healthcheck runs so slow that + # it starts after the podman stop below and then fails with + # "can only create exec sessions on running containers: container state improper". + # To fix this we wait for a file th healthcheck creates right away to know it is running. + timeout=5 + while :; do + run_podman '?' exec $ctr cat /tmp/abc + if [[ "$status" -eq 0 ]]; then + break + fi + + timeout=$((timeout - 1)) + if [[ $timeout -eq 0 ]]; then + die "timed out waiting for healthcheck to run and create test file" + fi + sleep 1 + done + run_podman stop $ctr # Wait for background healthcheck to finish and make sure the exit status is 1 diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index 12256db917..71d66c005f 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -856,9 +856,10 @@ nameserver 8.8.8.8" "nameserver order is correct" local -a netmodes=("bridge") # pasta only works rootless - if is_rootless; then - netmodes+=("pasta") - fi + # FIXME: skip pasta because this is super flaky, https://bugs.passt.top/show_bug.cgi?id=202 + #if is_rootless; then + # netmodes+=("pasta") + #fi for netmode in "${netmodes[@]}"; do local range=$(random_free_port_range 3) diff --git a/test/system/505-networking-pasta.bats b/test/system/505-networking-pasta.bats index 4da8fc83f7..b3166df7c1 100644 --- a/test/system/505-networking-pasta.bats +++ b/test/system/505-networking-pasta.bats @@ -302,6 +302,7 @@ function pasta_test_do() { } @test "IPv6 default address assignment" { + skip "Host ipv6 set can vary vastly and may not have one true default address" skip_if_no_ipv6 "IPv6 not routable on the host" run_podman run --rm --net=pasta $IMAGE ip -j -6 address show