From a2b296c75beda26bccc07c9909da38aa80a3e7e4 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Thu, 26 Jan 2023 11:22:23 -0800 Subject: [PATCH] ci: fix directory existence racing in parallel test execution meson tests sharing a binary (and deviating in their env/args) will produce temporary logs to the same directory, which is assumed to exist only for the duration of a single test. This is problematic when running tests in parallel, as one test may remove the directory before the other(s) finish, causing a test flake. This appends the each test's pid to the output directory to enforce uniqueness and avoid the race. Signed-off-by: Ryan Neph Part-of: --- .gitlab-ci/meson/time-strace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/meson/time-strace.sh b/.gitlab-ci/meson/time-strace.sh index 705f3457e3e..dab628a89e7 100755 --- a/.gitlab-ci/meson/time-strace.sh +++ b/.gitlab-ci/meson/time-strace.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ "x$STRACEDIR" = "x" ]; then - STRACEDIR=meson-logs/strace/$(for i in $@; do basename -z -- $i; echo -n _; done) + STRACEDIR=meson-logs/strace/$(for i in $@; do basename -z -- $i; echo -n _; done).$$ fi mkdir -p $STRACEDIR