From 59b3b6d4e41a3483ef21bf10c4fdcd094f00473d Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Wed, 22 Apr 2026 05:51:48 +0200 Subject: [PATCH] Added locking around compiling in autotest.sh to avoid text busy race. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Daniel Gröber via Debian. See also issue #5805. --- tests/tools/autotest.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh index e19a8d5af..782681a5e 100755 --- a/tests/tools/autotest.sh +++ b/tests/tools/autotest.sh @@ -25,9 +25,11 @@ firrtl2verilog="" xfirrtl="../xfirrtl" abcprog="$toolsdir/../../yosys-abc" +exec {lock}<"$toolsdir"; flock "$lock" 1>&2 if [ ! -f "$toolsdir/cmp_tbdata" -o "$toolsdir/cmp_tbdata.c" -nt "$toolsdir/cmp_tbdata" ]; then ( set -ex; ${CXX:-g++} -Wall -o "$toolsdir/cmp_tbdata" "$toolsdir/cmp_tbdata.c"; ) || exit 1 fi +flock -u "$lock"; exec {lock}>&- while getopts xmGl:wkjvref:s:p:n:S:I:A:-: opt; do case "$opt" in