From a2e47c428535832b780774d01589bbcab484d3a6 Mon Sep 17 00:00:00 2001 From: Sudipta Pandit Date: Fri, 22 Nov 2024 10:51:48 +0530 Subject: [PATCH] xfstests: fix umask for mariner --- microsoft/testsuites/xfstests/xfstesting.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/microsoft/testsuites/xfstests/xfstesting.py b/microsoft/testsuites/xfstests/xfstesting.py index cb40aea2cd..f15cc4598c 100644 --- a/microsoft/testsuites/xfstests/xfstesting.py +++ b/microsoft/testsuites/xfstests/xfstesting.py @@ -18,7 +18,7 @@ simple_requirement, ) from lisa.features import Disk, Nvme -from lisa.operating_system import BSD, Oracle, Redhat, Windows +from lisa.operating_system import BSD, Oracle, Redhat, Windows, CBLMariner from lisa.sut_orchestrator import AZURE from lisa.sut_orchestrator.azure.features import AzureFileShare from lisa.sut_orchestrator.azure.platform_ import AzurePlatform @@ -27,8 +27,8 @@ from lisa.util import BadEnvironmentStateException, generate_random_chars from microsoft.testsuites.xfstests.xfstests import Xfstests -_scratch_folder = "/root/scratch" -_test_folder = "/root/test" +_scratch_folder = "/mnt/scratch" +_test_folder = "/mnt/test" def _prepare_data_disk( @@ -512,6 +512,14 @@ def _execute_xfstests( assert environment, "fail to get environment from testresult" node = cast(RemoteNode, environment.nodes[0]) + + # Fix Mariner umask for xfstests + if isinstance(node.os, CBLMariner): + echo = node.tools[Echo] + echo.write_to_file("umask 0022\n", "/etc/profile", sudo=True, append=True) + # Close the current session to apply the umask change on the next login + node.close() + # TODO: will include generic/641 once the kernel contains below fix. # exclude this case generic/641 temporarily # it will trigger oops on RHEL8.3/8.4, VM will reboot