Skip to content

[Android] Add support for named mutex on mobile platforms in CoreCLR #117760

Description

@kotlarmilos

Description

The failure occurs inside a background thread created by ThreadTestHelpers.CreateGuardedThread, which is used by RunTestInBackgroundThread.

---- System.IO.IOException : The system cannot open the device or file specified. : '9d82af713f23442b9ac977c74127c177'. One or more system calls failed: mkdtemp("/data/local/tmp/.dotnet.vL0mk2") == nullptr; errno == EACCES;
at System.Threading.Tests.ThreadTestHelpers.<>c__DisplayClass4_0.<CreateGuardedThread>b__1()
at System.Threading.Tests.ThreadTestHelpers.<>c__DisplayClass4_0.<CreateGuardedThread>b__2()
at System.Threading.Tests.ThreadTestHelpers.RunTestInBackgroundThread(Action test)
at System.Threading.Tests.MutexTests.AbandonExisting(String name, WaitHandleWaitType waitType, Int32 waitCount, Int32 notAbandonedWaitIndex, Boolean isNotAbandonedWaitObjectSignaled, Boolean abandonDuringWait, Boolean currentUserOnly, Boolean currentSessionOnly)

The test attempts to create a temporary directory or file in /data/local/tmp/. The system call fails with errno == EACCES because Android does not grant write permissions to that location.

The same issue is expected to occur on Apple mobile platforms.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions