git: aab8a370cc8b - stable/14 - dtrace tests: Fix loading of the test kernel module

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Sun, 09 Jun 2024 14:12:18 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=aab8a370cc8bf41df673ba80b14f542364071288

commit aab8a370cc8bf41df673ba80b14f542364071288
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-06-01 15:16:33 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-06-09 13:48:06 +0000

    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
    
    (cherry picked from commit cb6b5e8ab9cfe3938855826fa3de0f58dacd364e)
---
 cddl/usr.sbin/dtrace/tests/tools/dtest.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh
index d2f3dc4ed8df..a6634bea43a6 100755
--- a/cddl/usr.sbin/dtrace/tests/tools/dtest.sh
+++ b/cddl/usr.sbin/dtrace/tests/tools/dtest.sh
@@ -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=$?