From ee8048583bd5ede9bdc0849c9dbc8f5fcdf1a036 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 10 Jan 2023 10:53:10 -0500 Subject: [PATCH 1/4] Cirrus: Remove redundant package install attempt These are already present in the VM images. These instructions only cause the DNF cache to be refreshed, wasting precious developer time. Signed-off-by: Chris Evich --- contrib/cirrus/runner.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 63de27e2..74a05ed0 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -55,9 +55,6 @@ _run_setup() { # VM's come with the distro. skopeo package pre-installed dnf erase -y skopeo - # Required for testing the SIF transport - dnf install -y fakeroot squashfs-tools - msg "Removing systemd-resolved from nsswitch.conf" # /etc/resolv.conf is already set to bypass systemd-resolvd sed -i -r -e 's/^(hosts.+)resolve.+dns/\1dns/' /etc/nsswitch.conf From e239f32ae0c80471c9667df51a9fc7d9dcd5b0f5 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 6 Dec 2022 14:30:51 -0500 Subject: [PATCH 2/4] Cirrus: Update to F37 CI VM Images Signed-off-by: Chris Evich --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2b07443a..6f8be8e0 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -23,10 +23,10 @@ env: #### #### Cache-image names to test with (double-quotes around names are critical) #### - FEDORA_NAME: "fedora-36" + FEDORA_NAME: "fedora-37" # Google-cloud VM Images - IMAGE_SUFFIX: "c5495735033528320" + IMAGE_SUFFIX: "c6300530360713216" FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}" # Container FQIN's From 292962d34c7e43a3ad036465f3f82f5db86855a5 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Thu, 12 Jan 2023 13:11:34 -0500 Subject: [PATCH 3/4] Fix unnecessary use of podman in CI test For whatever reasons, the podman configuration in CI results in the inspect test throwing the following error: ``` not ok 4 inspect: image manifest list w/ diff platform 125 configuration is unset - using hardcoded default graph root \"/var/lib/containers/storage\"" configuration is unset - using hardcoded default graph root \"/var/lib/containers/storage\"" StoreOptions ``` Fix this by not using `podman`. It's unnecessary, since all the test needs is the golang-flavor of the current system's architecture name. That can easily be obtained by asking the go tool directly. Signed-off-by: Chris Evich --- systemtest/010-inspect.bats | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/systemtest/010-inspect.bats b/systemtest/010-inspect.bats index 97137acf..548174da 100644 --- a/systemtest/010-inspect.bats +++ b/systemtest/010-inspect.bats @@ -95,10 +95,11 @@ END_EXPECT # is created by the make-noarch-manifest script in this directory. img=docker://quay.io/libpod/notmyarch:20210121 - # Get our host arch (what we're running on). This assumes that skopeo - # arch matches podman; it also assumes running podman >= April 2020 - # (prior to that, the format keys were lower-case). - arch=$(podman info --format '{{.Host.Arch}}') + # Get our host golang arch (what we're running on, according to golang). + # This assumes that skopeo arch matches host arch (which it always should). + # Buildah is used here because it depends less on the exact system config + # than podman - and all we're really after is the golang-flavored arch name. + arch=$(go env GOARCH) # By default, 'inspect' tries to match our host os+arch. This should fail. run_skopeo 1 inspect $img From 1fac61ef57552f49c27eaf95ccbb49440dfa77c6 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 16 Jan 2023 11:39:04 -0500 Subject: [PATCH 4/4] Cirrus: Add a common intra-test reset function This is necessary, since running the skopeo tests modifies the host environment. This can result in some warning messages the first time a container is started. These messages can interfere with tests which are sensitive to stdout/stderr. Since many/most tests require a local image registry, launch it with `/bin/true` after doing a system reset to clear away any pesky warning messages. Signed-off-by: Chris Evich --- contrib/cirrus/runner.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 74a05ed0..3792a249 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -112,18 +112,32 @@ _run_unit() { make test-unit-local BUILDTAGS="$BUILDTAGS" } -_run_integration() { +_podman_reset() { # Ensure we start with a clean-slate - podman system reset --force + showrun podman system reset --force + # Don't pollute the CI environment + ( + source $CIRRUS_WORKING_DIR/systemtest/helpers.bash + # WARNING WARNING WARNING WARNING + # Without running a container, the system tests will inexplicably + # fail with obscure errors/warning messages. I have no idea why + # running a container after a `system reset` fixes/prevents the + # problem. The failures do not reproduce when tests are run manually. + # So unless or until /until somebody develops a better understanding, + # this fix is JFM. + # WARNING WARNING WARNING WARNING + showrun podman run -it --rm --entrypoint /bin/true $REGISTRY_FQIN + ) +} +_run_integration() { + _podman_reset make test-integration-local BUILDTAGS="$BUILDTAGS" } _run_system() { - # Ensure we start with a clean-slate - podman system reset --force - - # Executes with containers required for testing. + _podman_reset + ##### Note: Test MODIFIES THE HOST SETUP ##### make test-system-local BUILDTAGS="$BUILDTAGS" }