From 88e78456dbe88a3aa5ded9140fecca6ed7baa307 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 30 May 2023 07:38:10 -0600 Subject: [PATCH] e2e: make BuildImage parallel-safe "image rm concurrent" test is still failing, even after #18664: Error: no contents in "/tmp/podman_test967723851/Dockerfile" Probable cause: the images are built in parallel, and p.BuildImage() writes one single Dockerfile. (This almost certainly renders the test less effective than intended, since the generated images might end up being identical). Solution: write and use a uniquely-named Dockerfile Signed-off-by: Ed Santiago --- test/e2e/common_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index cf11c4eebf..d48845fc99 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -1188,7 +1188,7 @@ func (s *PodmanSessionIntegration) jq(jqCommand string) (string, error) { } func (p *PodmanTestIntegration) buildImage(dockerfile, imageName string, layers string, label string) string { - dockerfilePath := filepath.Join(p.TempDir, "Dockerfile") + dockerfilePath := filepath.Join(p.TempDir, "Dockerfile-"+stringid.GenerateRandomID()) err := os.WriteFile(dockerfilePath, []byte(dockerfile), 0755) Expect(err).ToNot(HaveOccurred()) cmd := []string{"build", "--pull-never", "--layers=" + layers, "--file", dockerfilePath}