dtrace tests: Fix loading of the test kernel module

The old way is racy and can cause two instances, running in parallel, to
attempt to load dtrace_test, and only one will succeed.  This caused
errors when running dtrace tests in parallel.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2024-06-01 11:16:33 -04:00
parent 4bddff0833
commit cb6b5e8ab9

View file

@ -100,7 +100,7 @@ readonly STDOUT=$(mktemp)
readonly TFILE=$(basename $1)
readonly EXOUT=${TFILE}.out
kldstat -q -m dtrace_test || kldload dtrace_test
kldload -n dtrace_test
cd $(dirname $1)
runtest
RESULT=$?