- temporarily run tests without sudo if it's requested for System.IO.Pipes.Tests, System.Net.Ping.Functional.Tests, System.Diagnostics.Process, System.Formats.Tar due to missing sudo for TizenX
- temporarily skip tests requiring sudo for System.IO.FileSystem.Tests due to missing sudo for TizenX
- skip tests requiring too much memory for System.Runtime.Numerics.Tests, System.Runtime.Tests due to OOM
- pack correct System.Formats.Asn1.dll for System.Net.Security.Tests
- pack correct System.Collections.Immutable.dll for Microsoft.Extensions.Options.SourceGeneration.Unit.Tests
- pack correct dlls for System.Text.RegularExpressions.Tests
- increase timeout for RemoteExecutor from 60 seconds to 600 for System.Net.Security.Tests, System.Net.Ping.Functional.Tests, System.Net.Http.Functional.Tests
- skip tests in System.Net.Ping.Functional.Tests due to ping hang with ttl 1 on TizenX
# There are no tests in Microsoft.Extensions.DependencyInjection.Specification.Tests
rm -rf artifacts/corefx_tests/tests/Microsoft.Extensions.DependencyInjection.Specification.Tests
+# This is a workaround for incorrect System.Formats.Asn1.dll packed for System.Net.Security.Tests
+cp %{_reldir_fx_withoob}/System.Formats.Asn1.dll artifacts/corefx_tests/tests/System.Net.Security.Tests/
+
+# This is a workaround for incorrect System.Collections.Immutable.dll packed for Microsoft.Extensions.Options.SourceGeneration.Unit.Tests
+cp %{_reldir_fx_withoob}/System.Collections.Immutable.dll artifacts/corefx_tests/tests/Microsoft.Extensions.Options.SourceGeneration.Unit.Tests/
+
+# This is a workaround for incorrect dlls packed for System.Text.RegularExpressions.Tests
+cp %{_reldir_fx_withoob}/System.Threading.dll artifacts/corefx_tests/tests/System.Text.RegularExpressions.Tests/
+cp %{_reldir_fx_withoob}/System.Collections.Concurrent.dll artifacts/corefx_tests/tests/System.Text.RegularExpressions.Tests/
+cp %{_reldir_fx_withoob}/System.Reflection.Emit.Lightweight.dll artifacts/corefx_tests/tests/System.Text.RegularExpressions.Tests/
+cp %{_reldir_fx_withoob}/System.Collections.Immutable.dll artifacts/corefx_tests/tests/System.Text.RegularExpressions.Tests/
+cp %{_reldir_fx_withoob}/System.Linq.dll artifacts/corefx_tests/tests/System.Text.RegularExpressions.Tests/
+cp %{_reldir_fx_withoob}/System.Linq.Expressions.dll artifacts/corefx_tests/tests/System.Text.RegularExpressions.Tests/
+cp %{_reldir_fx_withoob}/System.Reflection.Emit.ILGeneration.dll artifacts/corefx_tests/tests/System.Text.RegularExpressions.Tests/
+
source /etc/os-release
cp %{_reldir_fx_withoob}/*.dll artifacts/corefx_tests/coreroot/
// Start as root
string userName = GetCurrentRealUserName();
using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(runsAsRoot, userName, useRootGroups.ToString(),
- new RemoteInvokeOptions { RunAsSudo = true }))
+ new RemoteInvokeOptions { RunAsSudo = false }))
{ }
}
Environment.UserName;
Assert.NotNull(realUserName);
- Assert.NotEqual("root", realUserName);
+ //Tests on tizen can be launched under root
+ //Assert.NotEqual("root", realUserName);
return realUserName;
}
Assert.Null(reader.GetNextEntry());
}
- }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(reader.GetNextEntry());
}
- }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(reader.GetNextEntry());
}
- }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(reader.GetNextEntry());
}
- }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(reader.GetNextEntry());
}
- }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(reader.GetNextEntry());
}
- }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
}
}
}
}
}
- }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
}
}
}
- }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
}
}
}
- }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, format.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(await reader.GetNextEntryAsync());
}
- }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(await reader.GetNextEntryAsync());
}
- }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[ConditionalTheory(nameof(IsRemoteExecutorSupportedAndPrivilegedProcess))]
Assert.Null(await reader.GetNextEntryAsync());
}
- }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, f.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
}
}
[ConditionalFact(nameof(IsBindMountSupportedAndPrivilegedProcess))]
[OuterLoop("Needs sudo access")]
[PlatformSpecific(TestPlatforms.Linux)]
+ [ActiveIssue("sudo is currently not available on Tizen X")]
public void Unix_NotFoundDirectory_ReadOnlyVolume()
{
ReadOnly_FileSystemHelper(readOnlyDirectory =>
[ConditionalFact(nameof(IsBindMountSupportedAndPrivilegedProcess))]
[OuterLoop("Needs sudo access")]
[PlatformSpecific(TestPlatforms.Linux)]
+ [ActiveIssue("sudo is currently not available on Tizen X")]
public void Unix_NonExistentPath_ReadOnlyVolume()
{
ReadOnly_FileSystemHelper(readOnlyDirectory =>
[ConditionalFact(nameof(IsBindMountSupportedAndPrivilegedProcess))]
[OuterLoop("Needs sudo access")]
[PlatformSpecific(TestPlatforms.Linux)]
+ [ActiveIssue("sudo is currently not available on Tizen X")]
public void Unix_ExistingDirectory_ReadOnlyVolume()
{
ReadOnly_FileSystemHelper(readOnlyDirectory =>
string readOnlyDirectory = GetTestFilePath();
Directory.CreateDirectory(readOnlyDirectory);
- Assert.Equal(0, AdminHelpers.RunAsSudo($"mount --bind {sourceDirectory} {readOnlyDirectory}"));
+ static int RunWithoutSudo(string command, string args)
+ {
+ ProcessStartInfo startInfo = new ProcessStartInfo()
+ {
+ FileName = command,
+ Arguments = args
+ };
+
+ using (Process process = Process.Start(startInfo))
+ {
+ Assert.True(process.WaitForExit(30000));
+ return process.ExitCode;
+ }
+ }
+
+ Assert.Equal(0, RunWithoutSudo("mount", $"--bind {sourceDirectory} {readOnlyDirectory}"));
try
{
- Assert.Equal(0, AdminHelpers.RunAsSudo($"mount -o remount,ro,bind {sourceDirectory} {readOnlyDirectory}"));
+ Assert.Equal(0, RunWithoutSudo("mount", $"-o remount,ro,bind {sourceDirectory} {readOnlyDirectory}"));
testAction(readOnlyDirectory);
}
finally
{
// Clean up test environment
- Assert.Equal(0, AdminHelpers.RunAsSudo($"umount {readOnlyDirectory}"));
+ Assert.Equal(0, RunWithoutSudo("umount", $"{readOnlyDirectory}"));
}
}
pipeName,
clientPipeOptions == PipeOptions.CurrentUserOnly ? "true" : "false",
clientPipeDirection == PipeDirection.In ? "true" : "false",
- new RemoteInvokeOptions { RunAsSudo = true }))
+ new RemoteInvokeOptions { RunAsSudo = false }))
{
}
count: 1);
ValidateEventCounters(events, requestCount: 1, shouldHaveFailures: false, versionMajor: version.Major);
- }, UseVersion.ToString(), testMethod).Dispose();
+ }, UseVersion.ToString(), testMethod, new RemoteInvokeOptions { TimeOut = 600 * 1000}).Dispose();
}
[OuterLoop]
ValidateConnectionEstablishedClosed(events, version, expectedUri);
ValidateEventCounters(events, requestCount: 1, shouldHaveFailures: true, versionMajor: version.Major);
- }, UseVersion.ToString(), testMethod).Dispose();
+ }, UseVersion.ToString(), testMethod, new RemoteInvokeOptions { TimeOut = 600 * 1000}).Dispose();
}
[OuterLoop]
count: 1);
ValidateEventCounters(events, requestCount: 1, shouldHaveFailures: false, versionMajor: version.Major);
- }, UseVersion.ToString(), testMethod).Dispose();
+ }, UseVersion.ToString(), testMethod, new RemoteInvokeOptions { TimeOut = 600 * 1000}).Dispose();
}
private static void ValidateStartFailedStopEvents(ConcurrentQueue<(EventWrittenEventArgs Event, Guid ActivityId)> events, Version version, bool shouldHaveFailures = false, int count = 1)
ValidateRequestResponseStartStopEvents(events, requestContentLength: null, responseContentLength: 0, count: 3);
ValidateEventCounters(events, requestCount: 3, shouldHaveFailures: false, versionMajor: version.Major, requestLeftQueue: true);
- }, UseVersion.ToString()).Dispose();
+ }, UseVersion.ToString(), new RemoteInvokeOptions { TimeOut = 600 * 1000}).Dispose();
}
[OuterLoop]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop] // Depends on external host and assumption that network respects and does not change TTL
+ [ActiveIssue("ping with TTL 1 hangs on Tizen X")]
public async Task SendPingToExternalHostWithLowTtlTest()
{
string host = System.Net.Test.Common.Configuration.Ping.PingHost;
PingResultValidator(pingReply, new IPAddress[] { IPAddress.Parse(address) }, null);
Assert.Equal(buffer, pingReply.Buffer);
});
- }, localIpAddress.ToString(), new RemoteInvokeOptions { RunAsSudo = true }).Dispose();
+ }, localIpAddress.ToString(), new RemoteInvokeOptions { RunAsSudo = false }).Dispose();
}
[PlatformSpecific(TestPlatforms.AnyUnix)]
Assert.Equal(false, clientFailure.Payload[0]);
VerifyEventCounters(events, shouldHaveFailures: true);
- }).Dispose();
+ }, new RemoteInvokeOptions { TimeOut = 600 * 1000}).Dispose();
}
private static SslProtocols ValidateHandshakeStopEventPayload(EventWrittenEventArgs stopEvent, bool failure = false)
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))] // Requires a lot of memory
[OuterLoop("Takes a long time, allocates a lot of memory")]
[SkipOnMono("Frequently throws OOM on Mono")]
+ [SkipOnCoreClr("Frequently throws OOM on CoreClr")]
public static void ToString_ValidLargeFormat()
{
BigInteger b = new BigInteger(123456789000m);
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))] // Requires a lot of memory
[OuterLoop("Takes a long time, allocates a lot of memory")]
[SkipOnMono("Frequently throws OOM on Mono")]
+ [SkipOnCoreClr("Frequently throws OOM on CoreClr")]
public static void ToString_ValidLargeFormat()
{
double d = 123.0;