mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-23 00:11:16 +00:00
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 <foxywang@tencent.com>
This commit is contained in:
parent
9c2d650cb8
commit
ee2f0c3cb4
@ -3994,7 +3994,7 @@ mod common_parallel {
|
|||||||
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||||
let guest = Guest::new(Box::new(focal));
|
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")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
let console_str: &str = "console=ttyS0";
|
let console_str: &str = "console=ttyS0";
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
@ -4107,8 +4107,8 @@ mod common_parallel {
|
|||||||
fn test_serial_socket_interaction() {
|
fn test_serial_socket_interaction() {
|
||||||
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||||
let guest = Guest::new(Box::new(focal));
|
let guest = Guest::new(Box::new(focal));
|
||||||
let serial_socket = guest.tmp_dir.as_path().join("/tmp/serial.socket");
|
let serial_socket = guest.tmp_dir.as_path().join("serial.socket");
|
||||||
let serial_socket_pty = guest.tmp_dir.as_path().join("/tmp/serial.pty");
|
let serial_socket_pty = guest.tmp_dir.as_path().join("serial.pty");
|
||||||
let serial_option = if cfg!(target_arch = "x86_64") {
|
let serial_option = if cfg!(target_arch = "x86_64") {
|
||||||
" console=ttyS0"
|
" console=ttyS0"
|
||||||
} else {
|
} else {
|
||||||
@ -4221,7 +4221,7 @@ mod common_parallel {
|
|||||||
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||||
let guest = Guest::new(Box::new(focal));
|
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)
|
let mut child = GuestCommand::new(&guest)
|
||||||
.args(["--cpus", "boot=1"])
|
.args(["--cpus", "boot=1"])
|
||||||
.args(["--memory", "size=512M"])
|
.args(["--memory", "size=512M"])
|
||||||
|
Loading…
Reference in New Issue
Block a user