"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 <[email protected]> --- tests/automake.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/automake.mk b/tests/automake.mk index 7eed1064e82b..c5cc95251207 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 > [email protected] && \ chmod +x [email protected] && \ -- 2.10.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
