From 488927a5eacb257a68fb7467371bf408e161d5ca Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Wed, 1 Apr 2026 19:01:56 -0700 Subject: [PATCH] performance-metrics: Remove duplicate direct_kernel_boot_path() Remove the local direct_kernel_boot_path() function and unused PathBuf import from performance_tests.rs. The identical public function from test_infra is already available via wildcard import. Signed-off-by: Muminul Islam --- performance-metrics/src/performance_tests.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/performance-metrics/src/performance_tests.rs b/performance-metrics/src/performance_tests.rs index 1022aac19..fa2f8ac3d 100644 --- a/performance-metrics/src/performance_tests.rs +++ b/performance-metrics/src/performance_tests.rs @@ -5,7 +5,6 @@ // Performance tests -use std::path::PathBuf; use std::time::Duration; use std::{fs, thread}; @@ -130,22 +129,6 @@ fn performance_test_new_guest(disk_config: Box) -> Guest { const DIRECT_KERNEL_BOOT_CMDLINE: &str = "root=/dev/vda1 console=hvc0 rw systemd.journald.forward_to_console=1"; -// Creates the path for direct kernel boot and return the path. -// For x86_64, this function returns the vmlinux kernel path. -// For AArch64, this function returns the PE kernel path. -fn direct_kernel_boot_path() -> PathBuf { - let mut workload_path = dirs::home_dir().unwrap(); - workload_path.push("workloads"); - - let mut kernel_path = workload_path; - #[cfg(target_arch = "x86_64")] - kernel_path.push("vmlinux-x86_64"); - #[cfg(target_arch = "aarch64")] - kernel_path.push("Image-arm64"); - - kernel_path -} - fn remote_command(api_socket: &str, command: &str, arg: Option<&str>) -> bool { let mut cmd = std::process::Command::new(clh_command("ch-remote")); cmd.args([&format!("--api-socket={api_socket}"), command]);