git: c2de0116c801 - main - vmm tests: Check for /dev/vmmctl to decide if vmm is initialized

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Sat, 08 Feb 2025 16:05:47 UTC
The branch main has been updated by markj:

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

commit c2de0116c80176829406289da3b79b6e70855ea4
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-02-08 15:01:43 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-02-08 16:05:37 +0000

    vmm tests: Check for /dev/vmmctl to decide if vmm is initialized
    
    If vmm.ko is loaded but fails initialization, it doesn't get
    automatically unloaded, so the tests will not skip themselves and will
    instead fail outright.
    
    MFC after:      1 week
---
 tests/sys/vmm/vmm_cred_jail.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/sys/vmm/vmm_cred_jail.sh b/tests/sys/vmm/vmm_cred_jail.sh
index 4ead7fdd897d..5b02b5dc0b42 100644
--- a/tests/sys/vmm/vmm_cred_jail.sh
+++ b/tests/sys/vmm/vmm_cred_jail.sh
@@ -38,7 +38,7 @@ vmm_cred_jail_host_head()
 }
 vmm_cred_jail_host_body()
 {
-	if ! kldstat -qn vmm; then
+	if ! -c /dev/vmmctl; then
 		atf_skip "vmm is not loaded"
 	fi
 	bhyvectl --vm=testvm --create
@@ -59,7 +59,7 @@ vmm_cred_jail_other_head()
 }
 vmm_cred_jail_other_body()
 {
-	if ! kldstat -qn vmm; then
+	if ! -c /dev/vmmctl; then
 		atf_skip "vmm is not loaded"
 	fi
 	vmm_mkjail myjail1