From c173c2cfa017d327587b9faa46b4a4815ae6884a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 11 Oct 2018 17:20:56 +0200 Subject: papr_prepare: remove double process for starting up .papr.sh and specify --security-opt label=disable Signed-off-by: Giuseppe Scrivano --- .papr_prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.papr_prepare.sh b/.papr_prepare.sh index 0f06af00d..f20cfbcf9 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 --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 -- cgit v1.2.3-54-g00ecf From e1521c6323514426818f0df52d137c47a89bc25f Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 12 Oct 2018 16:59:01 +0200 Subject: tests: do not make assumptions on the mount output Signed-off-by: Giuseppe Scrivano --- test/e2e/run_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-54-g00ecf From 1f8b844c2bfe3edfe4ee667e68f265cf3bf08d53 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 12 Oct 2018 13:25:56 +0200 Subject: tests: do not fail in the cleanup phase Signed-off-by: Giuseppe Scrivano --- contrib/python/podman/test/test_runner.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/python/podman/test/test_runner.sh b/contrib/python/podman/test/test_runner.sh index 1b7e0a85e..65cbd1e9c 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' -- cgit v1.2.3-54-g00ecf From 83f79dbacc3eb6eb655960281cf28cf90842759b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 12 Oct 2018 17:37:13 +0200 Subject: papr: relabel GOPATH/github.com/containers/libpod Signed-off-by: Giuseppe Scrivano --- .papr_prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.papr_prepare.sh b/.papr_prepare.sh index f20cfbcf9..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 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 -- cgit v1.2.3-54-g00ecf