mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
tests: Enable landlock in test_disk_hotplug
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
parent
5021aa05e8
commit
69a4cda8ec
@ -5161,6 +5161,10 @@ mod common_parallel {
|
|||||||
let kernel_path = edk2_path();
|
let kernel_path = edk2_path();
|
||||||
|
|
||||||
let api_socket = temp_api_path(&guest.tmp_dir);
|
let api_socket = temp_api_path(&guest.tmp_dir);
|
||||||
|
//Hotplugged disk path
|
||||||
|
let mut blk_file_path = dirs::home_dir().unwrap();
|
||||||
|
blk_file_path.push("workloads");
|
||||||
|
blk_file_path.push("blk.img");
|
||||||
|
|
||||||
let mut child = GuestCommand::new(&guest)
|
let mut child = GuestCommand::new(&guest)
|
||||||
.args(["--api-socket", &api_socket])
|
.args(["--api-socket", &api_socket])
|
||||||
@ -5168,6 +5172,7 @@ mod common_parallel {
|
|||||||
.args(["--memory", "size=512M"])
|
.args(["--memory", "size=512M"])
|
||||||
.args(["--kernel", kernel_path.to_str().unwrap()])
|
.args(["--kernel", kernel_path.to_str().unwrap()])
|
||||||
.args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
|
.args(["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
|
||||||
|
.args(["--landlock-rules", format!("path={:?},flags=rw", blk_file_path.as_path().to_str().unwrap()).as_str()])
|
||||||
.default_disks()
|
.default_disks()
|
||||||
.default_net()
|
.default_net()
|
||||||
.capture_output()
|
.capture_output()
|
||||||
@ -5188,10 +5193,6 @@ mod common_parallel {
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
// Now let's add the extra disk.
|
|
||||||
let mut blk_file_path = dirs::home_dir().unwrap();
|
|
||||||
blk_file_path.push("workloads");
|
|
||||||
blk_file_path.push("blk.img");
|
|
||||||
let (cmd_success, cmd_output) = remote_command_w_output(
|
let (cmd_success, cmd_output) = remote_command_w_output(
|
||||||
&api_socket,
|
&api_socket,
|
||||||
"add-disk",
|
"add-disk",
|
||||||
|
Loading…
Reference in New Issue
Block a user