From 3d3693699bd1f52bfcb803803b86866fe476a299 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Tue, 26 Dec 2023 15:27:45 +0800 Subject: [PATCH] build: fix clippy Path::join issue CI reports clippy errors: error: argument to `Path::join` starts with a path separator --> tests/integration.rs:4076:58 | 4076 | let serial_socket = guest.tmp_dir.as_path().join("/tmp/serial.socket"); | ^^^^^^^^^^^^^^^^^^^^ | = note: joining a path starting with separator will replace the path instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#join_absolute_paths Signed-off-by: Yi Wang (cherry picked from commit ee2f0c3cb4fc3d014af3b85f3da8bfe1d41c6e48) --- tests/integration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 758bfaa54..f3ba37281 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -3457,7 +3457,7 @@ mod common_parallel { let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(focal)); - let serial_path = guest.tmp_dir.as_path().join("/tmp/serial-output"); + let serial_path = guest.tmp_dir.as_path().join("serial-output"); #[cfg(target_arch = "x86_64")] let console_str: &str = "console=ttyS0"; #[cfg(target_arch = "aarch64")] @@ -3656,7 +3656,7 @@ mod common_parallel { let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(focal)); - let console_path = guest.tmp_dir.as_path().join("/tmp/console-output"); + let console_path = guest.tmp_dir.as_path().join("console-output"); let mut child = GuestCommand::new(&guest) .args(["--cpus", "boot=1"]) .args(["--memory", "size=512M"])