()
| 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() { |
nothing calls this directly
no test coverage detected