Files
nvdriver/tests/timer-timeout-vgx/provider.rs

21 lines
585 B
Rust

#[allow(dead_code)]
#[path = "../../src/nvidia/kernel/hypervisor.rs"]
mod hypervisor;
fn main() {
let expected: u8 = std::env::args().nth(1).unwrap().parse().unwrap();
if expected == 8 {
assert_eq!(
hypervisor::BuildProduct::current(),
Err(hypervisor::UnresolvedBuildProduct)
);
return;
}
let product = hypervisor::BuildProduct::current().unwrap();
assert_eq!(
product.roles(),
[expected & 1 != 0, expected & 2 != 0, expected & 4 != 0]
);
assert_eq!(product.is_vgx_hyper(), expected != 0);
}