From 562a57012f0d50589b975a261c92eb2e5fb52b79 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Tue, 28 Sep 2021 11:21:56 +0200 Subject: [PATCH] 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 --- tests/integration.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 2496d10ff..6bee0b303 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -123,10 +123,10 @@ mod tests { (child, virtiofsd_socket_path) } - fn prepare_virtofsd_rs_daemon( + fn prepare_virtiofsd_rs_daemon( tmp_dir: &TempDir, shared_dir: &str, - _cache: &str, + cache: &str, ) -> (std::process::Child, String) { let mut workload_path = dirs::home_dir().unwrap(); workload_path.push("workloads"); @@ -142,6 +142,7 @@ mod tests { let child = Command::new(virtiofsd_path.as_str()) .args(&["--shared-dir", shared_dir]) .args(&["--socket", virtiofsd_socket_path.as_str()]) + .args(&["--cache", cache]) .spawn() .unwrap(); @@ -3037,7 +3038,7 @@ mod tests { #[test] 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] @@ -3045,15 +3046,15 @@ mod tests { test_virtio_fs( true, Some(0x4000_0000), - "none", - &prepare_virtofsd_rs_daemon, + "never", + &prepare_virtiofsd_rs_daemon, false, ) } #[test] 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] @@ -3071,13 +3072,13 @@ mod tests { #[test] #[cfg(target_arch = "x86_64")] 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] #[cfg(target_arch = "x86_64")] 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]