diff --git a/integration_tests/tests/block.rs b/integration_tests/tests/block.rs index be7f1d1ba3..e238bf9c58 100644 --- a/integration_tests/tests/block.rs +++ b/integration_tests/tests/block.rs @@ -37,10 +37,10 @@ fn prepare_disk_img() -> NamedTempFile { #[test] fn mount_block() { let disk = prepare_disk_img(); - let disk_path = disk.path().to_str().unwrap().to_string(); + let disk_path = disk.path().to_str().unwrap(); println!("disk={disk_path}"); - let config = Config::new().extra_args(vec!["--rwdisk".to_string(), disk_path]); + let config = Config::new().extra_args(vec!["--block".to_string(), format!("{},ro", disk_path)]); let mut vm = TestVm::new(config).unwrap(); assert_eq!( vm.exec_in_guest("mount -t ext4 /dev/vdb /mnt && echo 42") @@ -56,7 +56,7 @@ fn resize() { let disk_path = disk.path().to_str().unwrap().to_string(); println!("disk={disk_path}"); - let config = Config::new().extra_args(vec!["--rwdisk".to_string(), disk_path]); + let config = Config::new().extra_args(vec!["--block".to_string(), disk_path]); let mut vm = TestVm::new(config).unwrap(); // Check the initial block device size. diff --git a/integration_tests/tests/fixture/mod.rs b/integration_tests/tests/fixture/mod.rs index 12f71afdc0..5eaa7402eb 100644 --- a/integration_tests/tests/fixture/mod.rs +++ b/integration_tests/tests/fixture/mod.rs @@ -288,12 +288,12 @@ impl TestVm { /// Configures the VM rootfs to load from the guest_under_test assets. fn configure_rootfs(command: &mut Command, o_direct: bool) { let rootfs_and_option = format!( - "{}{}", + "{}{},ro,root", rootfs_path().to_str().unwrap(), if o_direct { ",o_direct=true" } else { "" } ); command - .args(&["--root", &rootfs_and_option]) + .args(&["--block", &rootfs_and_option]) .args(&["--params", "init=/bin/delegate"]); }