virt: add initial KVM validation coverage#437
virt: add initial KVM validation coverage#437smuppand wants to merge 2 commits intoqualcomm-linux:mainfrom
Conversation
Add Runner/utils/lib_kvm.sh with shared helpers for KVM and virtualization tests. The helper library provides KVM-specific checks for: - /dev/kvm presence and permissions - KVM ioctl API validation - KVM/EL2 dmesg scanning - dynamic EL2 DTB remoteproc/IOMMU evidence - QEMU binary discovery and KVM acceleration checks - optional tun/vhost-net infrastructure checks The library is intended to be sourced after functestlib.sh and reuses the existing common logging, dependency, kernel config, dmesg, and remoteproc helpers instead of duplicating generic testkit functionality. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
| log_info "-------------------Starting $TESTNAME Testcase----------------------------" | ||
| log_info "=== Test Initialization ===" | ||
|
|
||
| if command -v detect_platform >/dev/null 2>&1; then |
There was a problem hiding this comment.
can this condition be removed? in else condition wait_for_path is again implemented which would nullify the advantage of defining a function
There was a problem hiding this comment.
can this condition be removed? in else condition wait_for_path is again implemented which would nullify the advantage of defining a function
I do not see wait_for_path in this KVM path. The guard is for optional detect_platform support so the test can still run on minimal images. I moved dependency checks before this block, but kept the fallback platform logging.
| log_info "-------------------Starting $TESTNAME Testcase----------------------------" | ||
| log_info "=== Test Initialization ===" | ||
|
|
||
| if command -v detect_platform >/dev/null 2>&1; then |
There was a problem hiding this comment.
can this condition be removed? in else condition wait_for_path is again implemented which would nullify the advantage of defining a function
Add the first set of KVM validation tests under the Virtualization/KVM suite. This introduces: - KVM_Driver to validate /dev/kvm usability through KVM_GET_API_VERSION and KVM_CREATE_VM - KVM_EL2_DTB to dynamically validate EL2 DTB remoteproc/IOMMU runtime evidence without hardcoding target names - KVM_Infra to validate QEMU availability, KVM acceleration support, and optional VM host infrastructure such as tun/vhost-net The tests follow the qcom-linux-testkit conventions, reuse functestlib.sh, source the shared KVM helper library, and report SKIP for unsupported or missing optional KVM/virtualization components. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Add the first set of KVM validation tests under the new Virtualization/KVM suite.
Why this is needed:
Changes:
Notes: