Skip to content

Commit

Permalink
xfstests: fix umask for mariner (#3526)
Browse files Browse the repository at this point in the history
* xfstests: fix umask for mariner

* fix types
  • Loading branch information
realsdx authored Nov 22, 2024
1 parent 53e2945 commit fa952fe
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions microsoft/testsuites/xfstests/xfstesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fa952fe

Please sign in to comment.