From ab0f103dac2906e8df830c5d2d696605b8e9e5af Mon Sep 17 00:00:00 2001 From: Praveen K Paladugu Date: Tue, 19 Mar 2024 16:36:22 +0000 Subject: [PATCH] tests: Enable landlock in pmem_hotplug test Signed-off-by: Praveen K Paladugu --- tests/integration.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 7c7d0a433..717546895 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -5671,11 +5671,22 @@ mod common_parallel { 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]) .args(["--cpus", "boot=1"]) .args(["--memory", "size=512M"]) .args(["--kernel", kernel_path.to_str().unwrap()]) .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_net() .capture_output(); @@ -5703,8 +5714,6 @@ mod common_parallel { 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( &api_socket, "add-pmem",