From fa952fe602166bb4f0d67ad058d97e01f5442212 Mon Sep 17 00:00:00 2001 From: Sudipta Pandit Date: Fri, 22 Nov 2024 16:50:36 +0530 Subject: [PATCH] xfstests: fix umask for mariner (#3526) * xfstests: fix umask for mariner * fix types --- microsoft/testsuites/xfstests/xfstesting.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/microsoft/testsuites/xfstests/xfstesting.py b/microsoft/testsuites/xfstests/xfstesting.py index cb40aea2cd..97f2472fd1 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, CBLMariner, Oracle, Redhat, Windows 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,15 @@ 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] + profile_path = node.get_pure_path("/etc/profile") + echo.write_to_file("umask 0022\n", profile_path, 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