mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 22:40:18 +00:00
Use platform attribute for os specific tests
This commit is contained in:
parent
3fe5a709bb
commit
ff7a6dedeb
2 changed files with 15 additions and 48 deletions
|
@ -39,14 +39,10 @@ namespace Ryujinx.Memory.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
// Memory aliasing tests fail on CI at the moment.
|
||||||
|
[Platform(Exclude = "MacOsX")]
|
||||||
public void Test_Alias()
|
public void Test_Alias()
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsMacOS())
|
|
||||||
{
|
|
||||||
// Memory aliasing tests fail on CI at the moment.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
using MemoryBlock backing = new MemoryBlock(0x10000, MemoryAllocationFlags.Mirrorable);
|
using MemoryBlock backing = new MemoryBlock(0x10000, MemoryAllocationFlags.Mirrorable);
|
||||||
using MemoryBlock toAlias = new MemoryBlock(0x10000, MemoryAllocationFlags.Reserve | MemoryAllocationFlags.ViewCompatible);
|
using MemoryBlock toAlias = new MemoryBlock(0x10000, MemoryAllocationFlags.Reserve | MemoryAllocationFlags.ViewCompatible);
|
||||||
|
|
||||||
|
@ -58,14 +54,10 @@ namespace Ryujinx.Memory.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
// Memory aliasing tests fail on CI at the moment.
|
||||||
|
[Platform(Exclude = "MacOsX")]
|
||||||
public void Test_AliasRandom()
|
public void Test_AliasRandom()
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsMacOS())
|
|
||||||
{
|
|
||||||
// Memory aliasing tests fail on CI at the moment.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
using MemoryBlock backing = new MemoryBlock(0x80000, MemoryAllocationFlags.Mirrorable);
|
using MemoryBlock backing = new MemoryBlock(0x80000, MemoryAllocationFlags.Mirrorable);
|
||||||
using MemoryBlock toAlias = new MemoryBlock(0x80000, MemoryAllocationFlags.Reserve | MemoryAllocationFlags.ViewCompatible);
|
using MemoryBlock toAlias = new MemoryBlock(0x80000, MemoryAllocationFlags.Reserve | MemoryAllocationFlags.ViewCompatible);
|
||||||
|
|
||||||
|
@ -94,14 +86,10 @@ namespace Ryujinx.Memory.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
// Memory aliasing tests fail on CI at the moment.
|
||||||
|
[Platform(Exclude = "MacOsX")]
|
||||||
public void Test_AliasMapLeak()
|
public void Test_AliasMapLeak()
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsMacOS())
|
|
||||||
{
|
|
||||||
// Memory aliasing tests fail on CI at the moment.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ulong pageSize = 4096;
|
ulong pageSize = 4096;
|
||||||
ulong size = 100000 * pageSize; // The mappings limit on Linux is usually around 65K, so let's make sure we are above that.
|
ulong size = 100000 * pageSize; // The mappings limit on Linux is usually around 65K, so let's make sure we are above that.
|
||||||
|
|
||||||
|
|
|
@ -57,14 +57,10 @@ namespace Ryujinx.Tests.Memory
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
// Memory aliasing tests fail on CI at the moment.
|
||||||
|
[Platform(Exclude = "MacOsX")]
|
||||||
public void PartialUnmap([Values] bool readOnly)
|
public void PartialUnmap([Values] bool readOnly)
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsMacOS())
|
|
||||||
{
|
|
||||||
// Memory aliasing tests fail on CI at the moment.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set up an address space to test partial unmapping.
|
// Set up an address space to test partial unmapping.
|
||||||
// Should register the signal handler to deal with this on Windows.
|
// Should register the signal handler to deal with this on Windows.
|
||||||
ulong vaSize = 0x100000;
|
ulong vaSize = 0x100000;
|
||||||
|
@ -205,13 +201,10 @@ namespace Ryujinx.Tests.Memory
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
// Memory aliasing tests fail on CI at the moment.
|
||||||
|
[Platform(Exclude = "MacOsX")]
|
||||||
public unsafe void PartialUnmapNative()
|
public unsafe void PartialUnmapNative()
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsMacOS())
|
|
||||||
{
|
|
||||||
// Memory aliasing tests fail on CI at the moment.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set up an address space to test partial unmapping.
|
// Set up an address space to test partial unmapping.
|
||||||
// Should register the signal handler to deal with this on Windows.
|
// Should register the signal handler to deal with this on Windows.
|
||||||
|
@ -288,26 +281,16 @@ namespace Ryujinx.Tests.Memory
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
// Only test in Windows, as this is only used on Windows and uses Windows APIs for trimming.
|
||||||
|
[Platform("Win")]
|
||||||
public void ThreadLocalMap()
|
public void ThreadLocalMap()
|
||||||
{
|
{
|
||||||
if (!OperatingSystem.IsWindows())
|
|
||||||
{
|
|
||||||
// Only test in Windows, as this is only used on Windows and uses Windows APIs for trimming.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
PartialUnmapState.Reset();
|
PartialUnmapState.Reset();
|
||||||
ref var state = ref PartialUnmapState.GetRef();
|
ref var state = ref PartialUnmapState.GetRef();
|
||||||
|
|
||||||
bool running = true;
|
bool running = true;
|
||||||
var testThread = new Thread(() =>
|
var testThread = new Thread(() =>
|
||||||
{
|
{
|
||||||
if (!OperatingSystem.IsWindows())
|
|
||||||
{
|
|
||||||
// Need this here to avoid a warning.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
PartialUnmapState.GetRef().RetryFromAccessViolation();
|
PartialUnmapState.GetRef().RetryFromAccessViolation();
|
||||||
while (running)
|
while (running)
|
||||||
{
|
{
|
||||||
|
@ -334,14 +317,10 @@ namespace Ryujinx.Tests.Memory
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
// Only test in Windows, as this is only used on Windows and uses Windows APIs for trimming.
|
||||||
|
[Platform("Win")]
|
||||||
public unsafe void ThreadLocalMapNative()
|
public unsafe void ThreadLocalMapNative()
|
||||||
{
|
{
|
||||||
if (!OperatingSystem.IsWindows())
|
|
||||||
{
|
|
||||||
// Only test in Windows, as this is only used on Windows and uses Windows APIs for trimming.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
EnsureTranslator();
|
EnsureTranslator();
|
||||||
|
|
||||||
PartialUnmapState.Reset();
|
PartialUnmapState.Reset();
|
||||||
|
|
Loading…
Reference in a new issue