summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml2
-rw-r--r--.papr_prepare.sh2
-rwxr-xr-xcontrib/python/podman/test/test_runner.sh13
-rw-r--r--libpod/container_internal.go2
-rw-r--r--test/e2e/run_test.go6
5 files changed, 22 insertions, 3 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index bc471cb84..c00f2d095 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -19,6 +19,8 @@ env:
CNI_COMMIT: "7480240de9749f9a0a5c8614b17f1f03e0c06ab9"
CRIO_COMMIT: "662dbb31b5d4f5ed54511a47cde7190c61c28677"
RUNC_COMMIT: "ad0f5255060d36872be04de22f8731f38ef2d7b1"
+ # Enable debugging delay on test-failure if non-empty.
+ FLAKE_DEBUG_DELAY: 1
# File to update in home-dir with task-specific env. var values
ENVLIB: ".bash_profile"
# Overrides default location (/tmp/cirrus) for repo clone
diff --git a/.papr_prepare.sh b/.papr_prepare.sh
index 0f06af00d..e0657dcd2 100644
--- a/.papr_prepare.sh
+++ b/.papr_prepare.sh
@@ -14,4 +14,4 @@ fi
${CONTAINER_RUNTIME} build -t ${IMAGE} -f Dockerfile.${DIST} . 2>build.log
# Run the tests
-${CONTAINER_RUNTIME} run --rm --privileged --net=host -v $PWD:/go/src/github.com/containers/libpod --workdir /go/src/github.com/containers/libpod -e CGROUP_MANAGER=cgroupfs -e PYTHON=$PYTHON -e STORAGE_OPTIONS="--storage-driver=vfs" -e CRIO_ROOT="/go/src/github.com/containers/libpod" -e PODMAN_BINARY="/usr/bin/podman" -e CONMON_BINARY="/usr/libexec/podman/conmon" -e DIST=$DIST -e CONTAINER_RUNTIME=$CONTAINER_RUNTIME $IMAGE bash -c sh ./.papr.sh -b -i -t
+${CONTAINER_RUNTIME} run --rm --privileged --net=host -v $PWD:/go/src/github.com/containers/libpod:Z --workdir /go/src/github.com/containers/libpod -e CGROUP_MANAGER=cgroupfs -e PYTHON=$PYTHON -e STORAGE_OPTIONS="--storage-driver=vfs" -e CRIO_ROOT="/go/src/github.com/containers/libpod" -e PODMAN_BINARY="/usr/bin/podman" -e CONMON_BINARY="/usr/libexec/podman/conmon" -e DIST=$DIST -e CONTAINER_RUNTIME=$CONTAINER_RUNTIME $IMAGE sh ./.papr.sh -b -i -t
diff --git a/contrib/python/podman/test/test_runner.sh b/contrib/python/podman/test/test_runner.sh
index 1b7e0a85e..081b90779 100755
--- a/contrib/python/podman/test/test_runner.sh
+++ b/contrib/python/podman/test/test_runner.sh
@@ -27,6 +27,7 @@ done
shift $((OPTIND -1))
function cleanup {
+ set +xeuo pipefail
# aggressive cleanup as tests may crash leaving crap around
umount '^(shm|nsfs)'
umount '\/run\/netns'
@@ -142,6 +143,18 @@ else
RETURNCODE=$?
fi
+if [[ "$RETURNCODE" -ne 0 ]] && [[ -n "$FLAKE_DEBUG_DELAY" ]]
+then
+ cat << EOF > /dev/stderr
+*****
+***** WARNING: \$FLAKE_DEBUG_DELAY IS SET AND PYTHON-PODMAN TESTS EXITED: $RETURNCODE
+***** WARNING: Sleeping for 30 minutes for test-VM preservation oportunity.
+*****
+EOF
+ sleep 30m
+fi
+
+
pkill -9 podman
pkill -9 conmon
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 9291d72c1..40159194f 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1076,7 +1076,7 @@ func (c *Container) generatePasswd() (string, error) {
pwd := fmt.Sprintf("%s%d:x:%d:%d:container user:%s:/bin/sh\n", orig, uid, uid, gid, c.WorkingDir())
passwdFile, err := c.writeStringToRundir("passwd", pwd)
if err != nil {
- return "", errors.Wrapf(err, "failed to create temporary passwd fileo")
+ return "", errors.Wrapf(err, "failed to create temporary passwd file")
}
if os.Chmod(passwdFile, 0644); err != nil {
return "", err
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 271651056..052dd0566 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -218,7 +218,11 @@ var _ = Describe("Podman run", func() {
session = podmanTest.Podman([]string{"run", "--rm", "--mount", fmt.Sprintf("type=bind,src=%s,target=/run/test,shared", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- Expect(session.OutputToString()).To(ContainSubstring("/run/test rw,relatime shared"))
+ found, matches := session.GrepString("/run/test")
+ Expect(found).Should(BeTrue())
+ Expect(matches[0]).To(ContainSubstring("rw"))
+ Expect(matches[0]).To(ContainSubstring("relatime"))
+ Expect(matches[0]).To(ContainSubstring("shared"))
mountPath = filepath.Join(podmanTest.TempDir, "scratchpad")
os.Mkdir(mountPath, 0755)