summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-12-05 16:27:13 -0800
committerBen Pfaff <blp@ovn.org>2017-12-06 10:23:21 -0800
commit0cc54252c94bafd195d95694050354deb8fab3de (patch)
tree4816dac9ddb9576b9e5b72fdff1ccff6c5347598 /tests
parent081afa70fd772ab5aad6b2e6b669dfef894361c9 (diff)
downloadopenvswitch-0cc54252c94bafd195d95694050354deb8fab3de.tar.gz
tests: Use $(MKDIR_P) to avoid races.
"test -d x || mkdir x" has a race when invoked in parallel: it is possible for two processes to both see that 'x' does not exist and both try to create it, and if that happens then one of them will fail. This avoids the problem. Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/automake.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/automake.mk b/tests/automake.mk
index 7eed1064e..c5cc95251 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -193,7 +193,7 @@ valgrind_wrappers = \
tests/valgrind/test-type-props
$(valgrind_wrappers): tests/valgrind-wrapper.in
- @test -d tests/valgrind || mkdir tests/valgrind
+ @$(MKDIR_P) tests/valgrind
$(AM_V_GEN) sed -e 's,[@]wrap_program[@],$@,' \
$(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp && \
chmod +x $@.tmp && \