From 94526b2b86230bad75932627e895c1d431735d3e Mon Sep 17 00:00:00 2001 From: sat0ken <15720506+sat0ken@users.noreply.github.com> Date: Fri, 1 Nov 2024 07:35:59 +0900 Subject: [PATCH] set permision to /test Signed-off-by: sat0ken <15720506+sat0ken@users.noreply.github.com> --- tests/contest/contest/src/tests/process/process_test.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/contest/contest/src/tests/process/process_test.rs b/tests/contest/contest/src/tests/process/process_test.rs index 2e91b363e..d605e5c30 100644 --- a/tests/contest/contest/src/tests/process/process_test.rs +++ b/tests/contest/contest/src/tests/process/process_test.rs @@ -2,6 +2,7 @@ use crate::utils::test_inside_container; use anyhow::{bail, Context, Ok, Result}; use oci_spec::runtime::{ProcessBuilder, Spec, SpecBuilder}; use std::fs; +use std::os::unix::fs::PermissionsExt; use test_framework::{test_result, Test, TestGroup, TestResult}; fn create_spec() -> Result { @@ -28,6 +29,10 @@ fn process_test() -> TestResult { bail!(e) } } + let metadata = fs::metadata("/test")?; + let mut permissions = metadata.permissions(); + permissions.set_mode(0o700); + Ok(()) }) }