mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Enable VFIO integration tests
Re-enable the VFIO integration now the machine is back online. The image has been updated to rely on Ubuntu 22.04 (Jammy) and it's smaller given only the NVIDIA drivers along with the nvidia-smi tool are installed. The test to verify the GPU is functional has been simplified given it only relies on nvidia-smi to validate it has been able to find the Tesla T4 card, meaning the associated driver was loaded correctly. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
6a29eba69e
commit
e23f4e0783
@@ -1063,27 +1063,7 @@ impl Guest {
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub fn check_nvidia_gpu(&self) {
|
||||
// Run CUDA sample to validate it can find the device
|
||||
let device_query_result = self
|
||||
.ssh_command("sudo /root/NVIDIA_CUDA-11.3_Samples/bin/x86_64/linux/release/deviceQuery")
|
||||
.unwrap();
|
||||
assert!(device_query_result.contains("Detected 1 CUDA Capable device"));
|
||||
assert!(device_query_result.contains("Device 0: \"NVIDIA Tesla T4\""));
|
||||
assert!(device_query_result.contains("Result = PASS"));
|
||||
|
||||
// Run NVIDIA DCGM Diagnostics to validate the device is functional
|
||||
self.ssh_command("sudo nv-hostengine").unwrap();
|
||||
|
||||
assert!(self
|
||||
.ssh_command("sudo dcgmi discovery -l")
|
||||
.unwrap()
|
||||
.contains("Name: NVIDIA Tesla T4"));
|
||||
assert_eq!(
|
||||
self.ssh_command("sudo dcgmi diag -r 'diagnostic' | grep Pass | wc -l")
|
||||
.unwrap()
|
||||
.trim(),
|
||||
"10"
|
||||
);
|
||||
assert!(self.ssh_command("nvidia-smi").unwrap().contains("Tesla T4"));
|
||||
}
|
||||
|
||||
pub fn reboot_linux(&self, current_reboot_count: u32, custom_timeout: Option<i32>) {
|
||||
|
||||
Reference in New Issue
Block a user