diff --git a/test/e2e/benchmarks_test.go b/test/e2e/benchmarks_test.go index 6773eae024..fc74fd245d 100644 --- a/test/e2e/benchmarks_test.go +++ b/test/e2e/benchmarks_test.go @@ -178,7 +178,7 @@ var _ = Describe("Podman Benchmark Suite", func() { newBenchmark("podman push", func() { port, user, pass := getPortUserPass() - session := podmanTest.Podman([]string{"push", "--tls-verify=false", "--creds", user + ":" + pass, UBI_INIT, "localhost:" + port + "/repo/image:tag"}) + session := podmanTest.Podman([]string{"push", "--tls-verify=false", "--creds", user + ":" + pass, SYSTEMD_IMAGE, "localhost:" + port + "/repo/image:tag"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) }, &newBenchmarkOptions{needsRegistry: true}) @@ -192,7 +192,7 @@ var _ = Describe("Podman Benchmark Suite", func() { needsRegistry: true, init: func() { port, user, pass := getPortUserPass() - session := podmanTest.Podman([]string{"push", "--tls-verify=false", "--creds", user + ":" + pass, UBI_INIT, "localhost:" + port + "/repo/image:tag"}) + session := podmanTest.Podman([]string{"push", "--tls-verify=false", "--creds", user + ":" + pass, SYSTEMD_IMAGE, "localhost:" + port + "/repo/image:tag"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) }, diff --git a/test/e2e/config_amd64.go b/test/e2e/config_amd64.go index ba7940d57d..bf138c5b0c 100644 --- a/test/e2e/config_amd64.go +++ b/test/e2e/config_amd64.go @@ -1,16 +1,15 @@ package integration var ( - STORAGE_FS = "vfs" //nolint:revive,stylecheck - STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck - ROOTLESS_STORAGE_FS = "vfs" //nolint:revive,stylecheck - ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck - CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, NGINX_IMAGE, REDIS_IMAGE, REGISTRY_IMAGE, INFRA_IMAGE, LABELS_IMAGE, HEALTHCHECK_IMAGE, UBI_INIT, UBI_MINIMAL, fedoraToolbox} //nolint:revive,stylecheck - NGINX_IMAGE = "quay.io/libpod/alpine_nginx:latest" //nolint:revive,stylecheck - BB_GLIBC = "docker.io/library/busybox:glibc" //nolint:revive,stylecheck - REGISTRY_IMAGE = "quay.io/libpod/registry:2.8" //nolint:revive,stylecheck - LABELS_IMAGE = "quay.io/libpod/alpine_labels:latest" //nolint:revive,stylecheck - UBI_MINIMAL = "registry.access.redhat.com/ubi8-minimal" //nolint:revive,stylecheck - UBI_INIT = "registry.access.redhat.com/ubi8-init" //nolint:revive,stylecheck - CIRROS_IMAGE = "quay.io/libpod/cirros:latest" //nolint:revive,stylecheck + STORAGE_FS = "vfs" //nolint:revive,stylecheck + STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck + ROOTLESS_STORAGE_FS = "vfs" //nolint:revive,stylecheck + ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck + CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, NGINX_IMAGE, REDIS_IMAGE, REGISTRY_IMAGE, INFRA_IMAGE, LABELS_IMAGE, HEALTHCHECK_IMAGE, SYSTEMD_IMAGE, fedoraToolbox} //nolint:revive,stylecheck + NGINX_IMAGE = "quay.io/libpod/alpine_nginx:latest" //nolint:revive,stylecheck + BB_GLIBC = "docker.io/library/busybox:glibc" //nolint:revive,stylecheck + REGISTRY_IMAGE = "quay.io/libpod/registry:2.8" //nolint:revive,stylecheck + LABELS_IMAGE = "quay.io/libpod/alpine_labels:latest" //nolint:revive,stylecheck + SYSTEMD_IMAGE = "quay.io/libpod/systemd-image:20230106" //nolint:revive,stylecheck + CIRROS_IMAGE = "quay.io/libpod/cirros:latest" //nolint:revive,stylecheck ) diff --git a/test/e2e/config_arm64.go b/test/e2e/config_arm64.go index 32ed2f90d9..9bc8e1c364 100644 --- a/test/e2e/config_arm64.go +++ b/test/e2e/config_arm64.go @@ -1,16 +1,15 @@ package integration var ( - STORAGE_FS = "vfs" //nolint:revive,stylecheck - STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck - ROOTLESS_STORAGE_FS = "vfs" //nolint:revive,stylecheck - ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck - CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, NGINX_IMAGE, REDIS_IMAGE, REGISTRY_IMAGE, INFRA_IMAGE, LABELS_IMAGE, HEALTHCHECK_IMAGE, UBI_INIT, UBI_MINIMAL, fedoraToolbox} //nolint:revive,stylecheck - NGINX_IMAGE = "quay.io/lsm5/alpine_nginx-aarch64:latest" //nolint:revive,stylecheck - BB_GLIBC = "docker.io/library/busybox:glibc" //nolint:revive,stylecheck - REGISTRY_IMAGE = "quay.io/libpod/registry:2.8" //nolint:revive,stylecheck - LABELS_IMAGE = "quay.io/libpod/alpine_labels:latest" //nolint:revive,stylecheck - UBI_MINIMAL = "registry.access.redhat.com/ubi8-minimal" //nolint:revive,stylecheck - UBI_INIT = "registry.access.redhat.com/ubi8-init" //nolint:revive,stylecheck - CIRROS_IMAGE = "quay.io/libpod/cirros:latest" //nolint:revive,stylecheck + STORAGE_FS = "vfs" //nolint:revive,stylecheck + STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck + ROOTLESS_STORAGE_FS = "vfs" //nolint:revive,stylecheck + ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" //nolint:revive,stylecheck + CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, NGINX_IMAGE, REDIS_IMAGE, REGISTRY_IMAGE, INFRA_IMAGE, LABELS_IMAGE, HEALTHCHECK_IMAGE, SYSTEMD_IMAGE, fedoraToolbox} //nolint:revive,stylecheck + NGINX_IMAGE = "quay.io/lsm5/alpine_nginx-aarch64:latest" //nolint:revive,stylecheck + BB_GLIBC = "docker.io/library/busybox:glibc" //nolint:revive,stylecheck + REGISTRY_IMAGE = "quay.io/libpod/registry:2.8" //nolint:revive,stylecheck + LABELS_IMAGE = "quay.io/libpod/alpine_labels:latest" //nolint:revive,stylecheck + SYSTEMD_IMAGE = "quay.io/libpod/systemd-image:20230106" //nolint:revive,stylecheck + CIRROS_IMAGE = "quay.io/libpod/cirros:latest" //nolint:revive,stylecheck ) diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index fe78bd603d..9e2ff0b52f 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -143,7 +143,7 @@ var _ = Describe("Podman images", func() { result := podmanTest.Podman([]string{"images", "-q", "-f", "reference=quay.io/libpod/*"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) - Expect(result.OutputToStringArray()).To(HaveLen(7)) + Expect(result.OutputToStringArray()).To(HaveLen(8)) retalpine := podmanTest.Podman([]string{"images", "-f", "reference=*lpine*"}) retalpine.WaitWithDefaultTimeout() diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go index f87f65c340..4f370d8a2f 100644 --- a/test/e2e/rmi_test.go +++ b/test/e2e/rmi_test.go @@ -236,7 +236,7 @@ var _ = Describe("Podman rmi", func() { session = podmanTest.Podman([]string{"images", "-q", "-a"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - Expect(session.OutputToString()).To(HaveLen(155)) + Expect(session.OutputToString()).To(HaveLen(142)) }) It("podman rmi -a with no images should be exit 0", func() { diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go index 813b8ac7d5..1275f2d6fa 100644 --- a/test/e2e/run_selinux_test.go +++ b/test/e2e/run_selinux_test.go @@ -319,7 +319,7 @@ var _ = Describe("Podman run", func() { }) It("podman test init labels", func() { - session := podmanTest.Podman([]string{"create", UBI_INIT, "/sbin/init"}) + session := podmanTest.Podman([]string{"create", SYSTEMD_IMAGE, "/sbin/init"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) cid := session.OutputToString() diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go index 837c72252d..2070d06065 100644 --- a/test/e2e/systemd_test.go +++ b/test/e2e/systemd_test.go @@ -78,7 +78,7 @@ WantedBy=default.target It("podman run container with systemd PID1", func() { ctrName := "testSystemd" - run := podmanTest.Podman([]string{"run", "--name", ctrName, "-t", "-i", "-d", UBI_INIT, "/sbin/init"}) + run := podmanTest.Podman([]string{"run", "--name", ctrName, "-t", "-i", "-d", SYSTEMD_IMAGE, "/sbin/init"}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) @@ -87,7 +87,7 @@ WantedBy=default.target Expect(logs).Should(Exit(0)) // Give container 10 seconds to start - started := podmanTest.WaitContainerReady(ctrName, "Reached target Multi-User System.", 30, 1) + started := podmanTest.WaitContainerReady(ctrName, "Reached target multi-user.target - Multi-User System.", 30, 1) Expect(started).To(BeTrue()) systemctl := podmanTest.Podman([]string{"exec", "-t", "-i", ctrName, "systemctl", "status", "--no-pager"}) @@ -113,12 +113,12 @@ WantedBy=default.target cgroupPath := podmanTest.Podman([]string{"inspect", "--format='{{.State.CgroupPath}}'", ctrName}) cgroupPath.WaitWithDefaultTimeout() Expect(cgroupPath).Should(Exit(0)) - Expect(result.OutputToString()).To(Not(ContainSubstring("init.scope"))) + Expect(cgroupPath.OutputToString()).To(Not(ContainSubstring("init.scope"))) }) It("podman create container with systemd entrypoint triggers systemd mode", func() { ctrName := "testCtr" - run := podmanTest.Podman([]string{"create", "--name", ctrName, "--entrypoint", "/sbin/init", UBI_INIT}) + run := podmanTest.Podman([]string{"create", "--name", ctrName, "--entrypoint", "/sbin/init", SYSTEMD_IMAGE}) run.WaitWithDefaultTimeout() Expect(run).Should(Exit(0)) diff --git a/test/system/build-systemd-image b/test/system/build-systemd-image index a05577c6c2..43bcfc5c62 100755 --- a/test/system/build-systemd-image +++ b/test/system/build-systemd-image @@ -17,12 +17,13 @@ create_script=$(cd $(dirname $0) && git ls-files --full-name $(basename $0)) if [ -z "$create_script" ]; then create_script=$0 fi +create_script_rev=$(git describe --tags) # Creation timestamp, Zulu time create_time_t=$(date +%s) create_time_z=$(env TZ=UTC date --date=@$create_time_t +'%Y-%m-%dT%H:%M:%SZ') -set -ex +set -e # We'll need to create a Containerfile plus various other files to add in tmpdir=$(mktemp -t -d $(basename $0).tmp.XXXXXXX) @@ -31,9 +32,9 @@ echo $YMD >testimage-id cat >Containerfile < /dev/null || true $PODMAN rmi -f $testimg &> /dev/null || true # Arch emulation on Fedora requires the qemu-user-static package. -for arch in amd64 arm64 ppc64le s390x;do +declare -a arches=(amd64 arm64 ppc64le s390x) +n_arches=${#arches[*]} +i=0 +while [[ $i -lt $n_arches ]]; do + arch=${arches[$i]} + i=$((i+1)) + echo + echo "Building: $arch ($i of $n_arches)" $PODMAN build \ --arch=$arch \ --squash-all \ diff --git a/test/system/helpers.bash b/test/system/helpers.bash index d679ef5a2c..7c9af79cb4 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -14,7 +14,7 @@ PODMAN_TEST_IMAGE_ID= # Larger image containing systemd tools. PODMAN_SYSTEMD_IMAGE_NAME=${PODMAN_SYSTEMD_IMAGE_NAME:-"systemd-image"} -PODMAN_SYSTEMD_IMAGE_TAG=${PODMAN_SYSTEMD_IMAGE_TAG:-"20221206"} +PODMAN_SYSTEMD_IMAGE_TAG=${PODMAN_SYSTEMD_IMAGE_TAG:-"20230106"} PODMAN_SYSTEMD_IMAGE_FQN="$PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/$PODMAN_SYSTEMD_IMAGE_NAME:$PODMAN_SYSTEMD_IMAGE_TAG" # Remote image that we *DO NOT* fetch or keep by default; used for testing pull