diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index 6ae73ba2a5..02f57d0f93 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -597,7 +597,8 @@ RUN touch /file push := podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--creds=" + registry.User + ":" + registry.Password, "--format=v2s2", "localhost:" + registry.Port + "/citest:latest"}) push.WaitWithDefaultTimeout() - Expect(push).Should(ExitCleanly()) + // Cannot ExitCleanly() because this sometimes warns "Failed, retrying in 1s" + Expect(push).Should(Exit(0)) session = podmanTest.Podman([]string{"manifest", "add", "--tls-verify=false", "--creds=" + registry.User + ":" + registry.Password, "foo", "localhost:" + registry.Port + "/citest:latest"}) session.WaitWithDefaultTimeout() diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index a43cf89a94..31b5b9af0c 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -67,13 +67,19 @@ function teardown() { is "$output" "running:true:false:false" \ "State. Status:Running:Pause:Checkpointed" - # Pause briefly to let restarted container emit some output - sleep 0.3 - - # Get full logs, and make sure something changed - run_podman logs $cid - local nlines_after="${#lines[*]}" - assert $nlines_after -gt $nlines_before \ + # Re-fetch logs, and ensure that they continue growing. + # Allow a short while for container process to actually restart. + local retries=10 + while [[ $retries -gt 0 ]]; do + run_podman logs $cid + local nlines_after="${#lines[*]}" + if [[ $nlines_after -gt $nlines_before ]]; then + break + fi + sleep 0.1 + retries=$((retries - 1)) + done + assert "$retries" -gt 0 \ "Container failed to output new lines after first restore" # Same thing again: test for https://github.com/containers/crun/issues/756 @@ -83,12 +89,18 @@ function teardown() { nlines_before="${#lines[*]}" run_podman container restore $cid - # Give container time to write new output; then confirm that something - # was emitted - sleep 0.3 - run_podman container logs $cid - nlines_after="${#lines[*]}" - assert $nlines_after -gt $nlines_before \ + # Same as above, confirm that we get new output + retries=10 + while [[ $retries -gt 0 ]]; do + run_podman logs $cid + local nlines_after="${#lines[*]}" + if [[ $nlines_after -gt $nlines_before ]]; then + break + fi + sleep 0.1 + retries=$((retries - 1)) + done + assert "$retries" -gt 0 \ "stdout went away after second restore (crun issue 756)" run_podman rm -t 0 -f $cid diff --git a/test/system/700-play.bats b/test/system/700-play.bats index 0f302400dd..3720bff495 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -769,9 +769,16 @@ EOF CONTAINERS_CONF_OVERRIDE="$containersConf" run_podman kube play $YAML run_podman container inspect --format '{{ .Config.Umask }}' $ctrInPod is "${output}" "0472" - # Confirm that umask actually takes effect - run_podman logs $ctrInPod - is "$output" "204" "stat() on created file" + # Confirm that umask actually takes effect. Might take a second or so. + local retries=10 + while [[ $retries -gt 0 ]]; do + run_podman logs $ctrInPod + test -n "$output" && break + sleep 0.1 + retries=$((retries - 1)) + done + assert "$retries" -gt 0 "Timed out waiting for container output" + assert "$output" = "204" "stat() on created file" run_podman kube down $YAML run_podman pod rm -a