mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 03:15:20 +00:00
tests: Enable landlock in pmem_hotplug test
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
parent
57c9124379
commit
ab0f103dac
@ -5671,11 +5671,22 @@ mod common_parallel {
|
|||||||
|
|
||||||
let mut cmd = GuestCommand::new(&guest);
|
let mut cmd = GuestCommand::new(&guest);
|
||||||
|
|
||||||
|
let pmem_temp_file = TempFile::new().unwrap();
|
||||||
|
pmem_temp_file.as_file().set_len(128 << 20).unwrap();
|
||||||
|
|
||||||
cmd.args(["--api-socket", &api_socket])
|
cmd.args(["--api-socket", &api_socket])
|
||||||
.args(["--cpus", "boot=1"])
|
.args(["--cpus", "boot=1"])
|
||||||
.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",
|
||||||
|
pmem_temp_file.as_path().to_str().unwrap()
|
||||||
|
)
|
||||||
|
.as_str(),
|
||||||
|
])
|
||||||
.default_disks()
|
.default_disks()
|
||||||
.default_net()
|
.default_net()
|
||||||
.capture_output();
|
.capture_output();
|
||||||
@ -5703,8 +5714,6 @@ mod common_parallel {
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
let pmem_temp_file = TempFile::new().unwrap();
|
|
||||||
pmem_temp_file.as_file().set_len(128 << 20).unwrap();
|
|
||||||
let (cmd_success, cmd_output) = remote_command_w_output(
|
let (cmd_success, cmd_output) = remote_command_w_output(
|
||||||
&api_socket,
|
&api_socket,
|
||||||
"add-pmem",
|
"add-pmem",
|
||||||
|
Loading…
Reference in New Issue
Block a user