mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
tests: Update virtiofsd-rs to use the cache option
Now that virtiofsd-rs binary supports the cache option, let's use it. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
93d19329f9
commit
562a57012f
@ -123,10 +123,10 @@ mod tests {
|
|||||||
(child, virtiofsd_socket_path)
|
(child, virtiofsd_socket_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prepare_virtofsd_rs_daemon(
|
fn prepare_virtiofsd_rs_daemon(
|
||||||
tmp_dir: &TempDir,
|
tmp_dir: &TempDir,
|
||||||
shared_dir: &str,
|
shared_dir: &str,
|
||||||
_cache: &str,
|
cache: &str,
|
||||||
) -> (std::process::Child, String) {
|
) -> (std::process::Child, String) {
|
||||||
let mut workload_path = dirs::home_dir().unwrap();
|
let mut workload_path = dirs::home_dir().unwrap();
|
||||||
workload_path.push("workloads");
|
workload_path.push("workloads");
|
||||||
@ -142,6 +142,7 @@ mod tests {
|
|||||||
let child = Command::new(virtiofsd_path.as_str())
|
let child = Command::new(virtiofsd_path.as_str())
|
||||||
.args(&["--shared-dir", shared_dir])
|
.args(&["--shared-dir", shared_dir])
|
||||||
.args(&["--socket", virtiofsd_socket_path.as_str()])
|
.args(&["--socket", virtiofsd_socket_path.as_str()])
|
||||||
|
.args(&["--cache", cache])
|
||||||
.spawn()
|
.spawn()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
@ -3037,7 +3038,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_virtio_fs_dax_on_default_cache_size_w_virtiofsd_rs_daemon() {
|
fn test_virtio_fs_dax_on_default_cache_size_w_virtiofsd_rs_daemon() {
|
||||||
test_virtio_fs(true, None, "none", &prepare_virtofsd_rs_daemon, false)
|
test_virtio_fs(true, None, "never", &prepare_virtiofsd_rs_daemon, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -3045,15 +3046,15 @@ mod tests {
|
|||||||
test_virtio_fs(
|
test_virtio_fs(
|
||||||
true,
|
true,
|
||||||
Some(0x4000_0000),
|
Some(0x4000_0000),
|
||||||
"none",
|
"never",
|
||||||
&prepare_virtofsd_rs_daemon,
|
&prepare_virtiofsd_rs_daemon,
|
||||||
false,
|
false,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_virtio_fs_dax_off_w_virtiofsd_rs_daemon() {
|
fn test_virtio_fs_dax_off_w_virtiofsd_rs_daemon() {
|
||||||
test_virtio_fs(false, None, "none", &prepare_virtofsd_rs_daemon, false)
|
test_virtio_fs(false, None, "never", &prepare_virtiofsd_rs_daemon, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -3071,13 +3072,13 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
fn test_virtio_fs_hotplug_dax_on_w_virtiofsd_rs_daemon() {
|
fn test_virtio_fs_hotplug_dax_on_w_virtiofsd_rs_daemon() {
|
||||||
test_virtio_fs(true, None, "none", &prepare_virtofsd_rs_daemon, true)
|
test_virtio_fs(true, None, "never", &prepare_virtiofsd_rs_daemon, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
fn test_virtio_fs_hotplug_dax_off_w_virtiofsd_rs_daemon() {
|
fn test_virtio_fs_hotplug_dax_off_w_virtiofsd_rs_daemon() {
|
||||||
test_virtio_fs(false, None, "none", &prepare_virtofsd_rs_daemon, true)
|
test_virtio_fs(false, None, "never", &prepare_virtiofsd_rs_daemon, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user