MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / test_pmu_on

Function test_pmu_on

cloud-hypervisor/tests/integration.rs:1982–2015  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1980 #[test]
1981 #[cfg(target_arch = "aarch64")]
1982 fn test_pmu_on() {
1983 let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string());
1984 let guest = Guest::new(Box::new(disk_config));
1985 let mut child = GuestCommand::new(&guest)
1986 .default_cpus()
1987 .default_memory()
1988 .args(["--kernel", direct_kernel_boot_path().to_str().unwrap()])
1989 .args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
1990 .default_disks()
1991 .default_net()
1992 .capture_output()
1993 .spawn()
1994 .unwrap();
1995
1996 let r = std::panic::catch_unwind(|| {
1997 guest.wait_vm_boot().unwrap();
1998
1999 // Test that PMU exists.
2000 assert_eq!(
2001 guest
2002 .ssh_command(GREP_PMU_IRQ_CMD)
2003 .unwrap()
2004 .trim()
2005 .parse::<u32>()
2006 .unwrap_or_default(),
2007 1
2008 );
2009 });
2010
2011 kill_child(&mut child);
2012 let output = child.wait_with_output().unwrap();
2013
2014 handle_child_output(r, &output);
2015 }
2016
2017 #[test]
2018 fn test_serial_off() {

Callers

nothing calls this directly

Calls 12

newFunction · 0.85
direct_kernel_boot_pathFunction · 0.85
kill_childFunction · 0.85
handle_child_outputFunction · 0.85
spawnMethod · 0.80
capture_outputMethod · 0.80
default_netMethod · 0.80
default_disksMethod · 0.80
argsMethod · 0.80
default_memoryMethod · 0.80
default_cpusMethod · 0.80
wait_vm_bootMethod · 0.80

Tested by

no test coverage detected