Skip to content

Commit

Permalink
Merge branch 'master' into darc-master-b26a5f18-f603-49aa-822a-9931db…
Browse files Browse the repository at this point in the history
…e2063d

Commit migrated from dotnet/corefx@1ac555f
  • Loading branch information
safern authored Jan 24, 2019
2 parents 70bf6ac + 544476b commit ef69a7b
Show file tree
Hide file tree
Showing 71 changed files with 6,647 additions and 121 deletions.
2 changes: 1 addition & 1 deletion docs/libraries/project-docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ Generally the CoreFx build system gets the CoreCLR from a NuGet package which ge
1. Build CoreCLR and note your output directory. Ex: `\coreclr\bin\Product\Windows_NT.x64.Release\` Note this will vary based on your OS/Architecture/Flavor and it is generally a good idea to use Release builds for CoreCLR when running CoreFx tests and the OS and Architecture should match what you are building in CoreFx.
2. Build CoreFx either passing in the `CoreCLROverridePath` property or setting it as an environment variable:
```
build.cmd -- /p:CoreCLROverridePath=d:\git\coreclr\bin\Product\Windows_NT.x64.Release\
build.cmd /p:CoreCLROverridePath=d:\git\coreclr\bin\Product\Windows_NT.x64.Release\
```
When we copy the files to override the CoreCLR we do a hard-link copy, so in general if you rebuild CoreCLR the new binaries should be reflected in CoreFx for subsequent builds of individual projects in corefx. However if you want to force refresh or if you want to just update the CoreCLR after you already ran `build.cmd` from CoreFx you can run the following command:
Expand Down
16 changes: 8 additions & 8 deletions eng/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
These ref versions are pulled from https://github.com/dotnet/versions.
-->
<PropertyGroup>
<CoreFxCurrentRef>e4b4e6fda28cb01c33870cd748b48586ebafdb1f</CoreFxCurrentRef>
<ProjectNTfsCurrentRef>e4b4e6fda28cb01c33870cd748b48586ebafdb1f</ProjectNTfsCurrentRef>
<ProjectNTfsTestILCCurrentRef>e4b4e6fda28cb01c33870cd748b48586ebafdb1f</ProjectNTfsTestILCCurrentRef>
<CoreFxCurrentRef>ac52aa5ded15d2f63486cfe69c03e237da7f8df0</CoreFxCurrentRef>
<ProjectNTfsCurrentRef>ac52aa5ded15d2f63486cfe69c03e237da7f8df0</ProjectNTfsCurrentRef>
<ProjectNTfsTestILCCurrentRef>ac52aa5ded15d2f63486cfe69c03e237da7f8df0</ProjectNTfsTestILCCurrentRef>
<SniCurrentRef>8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd</SniCurrentRef>
<StandardCurrentRef>9004703a1923e5c5582ceb8d79712df777412446</StandardCurrentRef>
<BuildToolsCurrentRef>f31086500dc58cefe7b1275300f6fc07b38c1bcc</BuildToolsCurrentRef>
Expand All @@ -29,11 +29,11 @@

<!-- Tests/infrastructure dependency versions. -->
<PropertyGroup>
<CoreFxExpectedPrerelease>preview.19071.2</CoreFxExpectedPrerelease>
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview.19071.2</MicrosoftNETCorePlatformsPackageVersion>
<ProjectNTfsExpectedPrerelease>beta-27322-00</ProjectNTfsExpectedPrerelease>
<ProjectNTfsTestILCExpectedPrerelease>beta-27322-00</ProjectNTfsTestILCExpectedPrerelease>
<ProjectNTfsTestILCPackageVersion>1.0.0-beta-27322-00</ProjectNTfsTestILCPackageVersion>
<CoreFxExpectedPrerelease>preview.19073.1</CoreFxExpectedPrerelease>
<MicrosoftNETCorePlatformsPackageVersion>3.0.0-preview.19073.1</MicrosoftNETCorePlatformsPackageVersion>
<ProjectNTfsExpectedPrerelease>beta-27323-00</ProjectNTfsExpectedPrerelease>
<ProjectNTfsTestILCExpectedPrerelease>beta-27323-00</ProjectNTfsTestILCExpectedPrerelease>
<ProjectNTfsTestILCPackageVersion>1.0.0-beta-27323-00</ProjectNTfsTestILCPackageVersion>

<!-- CoreFX-built SNI identity package -->
<RuntimeNativeSystemDataSqlClientSniPackageVersion>4.4.0</RuntimeNativeSystemDataSqlClientSniPackageVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ internal static partial class Libraries
internal const string Version = "version.dll";
internal const string WebSocket = "websocket.dll";
internal const string WinHttp = "winhttp.dll";
internal const string WinMM = "winmm.dll";
internal const string Ws2_32 = "ws2_32.dll";
internal const string Wtsapi32 = "wtsapi32.dll";
internal const string CompressionNative = "clrcompression.dll";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;

internal partial class Interop
{
internal partial class User32
{
internal const int MB_OK = 0;
internal const int MB_ICONHAND = 0x10;
internal const int MB_ICONQUESTION = 0x20;
internal const int MB_ICONEXCLAMATION = 0x30;
internal const int MB_ICONASTERISK = 0x40;

[DllImport(Libraries.User32, ExactSpelling = true)]
internal static extern bool MessageBeep(int type);
}
}
21 changes: 21 additions & 0 deletions src/libraries/Common/src/Interop/Windows/winmm/Interop.MMCKINFO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class WinMM
{
[StructLayout(LayoutKind.Sequential)]
internal class MMCKINFO
{
internal int ckID;
internal int cksize;
internal int fccType;
internal int dwDataOffset;
internal int dwFlags;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class WinMM
{
internal const int SND_SYNC = 0x0;
internal const int SND_ASYNC = 0x1;
internal const int SND_NODEFAULT = 0x2;
internal const int SND_MEMORY = 0x4;
internal const int SND_LOOP = 0x8;
internal const int SND_PURGE = 0x40;
internal const int SND_FILENAME = 0x20000;
internal const int SND_NOSTOP = 0x10;

[DllImport(Libraries.WinMM, ExactSpelling = true, CharSet = CharSet.Unicode, EntryPoint = "PlaySoundW")]
internal static extern bool PlaySound(string soundName, IntPtr hmod, int soundFlags);

[DllImport(Libraries.WinMM, ExactSpelling = true, EntryPoint = "PlaySoundW")]
internal static extern bool PlaySound(byte[] soundName, IntPtr hmod, int soundFlags);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class WinMM
{
[DllImport(Libraries.WinMM)]
internal static extern int mmioAscend(IntPtr hMIO, MMCKINFO lpck, int flags);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class WinMM
{
[DllImport(Interop.Libraries.WinMM)]
internal static extern int mmioClose(IntPtr hMIO, int flags);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class WinMM
{
internal const int MMIO_FINDRIFF = 0x00000020;

[DllImport(Libraries.WinMM)]
internal static extern int mmioDescend(IntPtr hMIO,
[MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lpck,
[MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lcpkParent,
int flags);
}
}
18 changes: 18 additions & 0 deletions src/libraries/Common/src/Interop/Windows/winmm/Interop.mmioOpen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class WinMM
{
internal const int MMIO_READ = 0x00000000;
internal const int MMIO_ALLOCBUF = 0x00010000;

[DllImport(Libraries.WinMM, CharSet = CharSet.Auto)]
internal static extern IntPtr mmioOpen(string fileName, IntPtr not_used, int flags);
}
}
31 changes: 31 additions & 0 deletions src/libraries/Common/src/Interop/Windows/winmm/Interop.mmioRead.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class WinMM
{
[StructLayout(LayoutKind.Sequential)]
internal class WAVEFORMATEX
{
internal short wFormatTag;
internal short nChannels;
internal int nSamplesPerSec;
internal int nAvgBytesPerSec;
internal short nBlockAlign;
internal short wBitsPerSample;
internal short cbSize;
}

internal const int WAVE_FORMAT_PCM = 0x0001;
internal const int WAVE_FORMAT_ADPCM = 0x0002;
internal const int WAVE_FORMAT_IEEE_FLOAT = 0x0003;

[DllImport(Libraries.WinMM)]
internal static extern int mmioRead(IntPtr hMIO, [MarshalAs(UnmanagedType.LPArray)] byte[] wf, int cch);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,16 @@ public void ConcurrentTimers()
TimerElapsedEventHandler handler = (sender, args) =>
{
bool signaled = false;
if (timersSignalled.TryGetValue(args.TimerId, out signaled) && !signaled)
lock (timersSignalled)
{
timersSignalled[args.TimerId] = true;

if (Interlocked.Increment(ref numSignaled) == NumConcurrentTimers)
if (timersSignalled.TryGetValue(args.TimerId, out signaled) && !signaled)
{
elapsed.Set();
timersSignalled[args.TimerId] = true;

if (Interlocked.Increment(ref numSignaled) == NumConcurrentTimers)
{
elapsed.Set();
}
}
}
};
Expand All @@ -107,15 +110,21 @@ public void ConcurrentTimers()

for (int i = 0; i < NumConcurrentTimers; i++)
{
timersSignalled[SystemEvents.CreateTimer(TimerInterval)] = false;
lock (timersSignalled)
{
timersSignalled[SystemEvents.CreateTimer(TimerInterval)] = false;
}
}

Assert.True(elapsed.WaitOne(TimerInterval * SystemEventsTest.ExpectedEventMultiplier));

foreach (var timer in timersSignalled.Keys.ToArray())
lock (timersSignalled)
{
Assert.True(timersSignalled[timer]);
SystemEvents.KillTimer(timer);
foreach (var timer in timersSignalled.Keys.ToArray())
{
Assert.True(timersSignalled[timer]);
SystemEvents.KillTimer(timer);
}
}
}
finally
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void WaitForSignal()
{
const string expectedSignal = "Signal";
const string successResponse = "Success";
const int timeout = 5 * 1000;
const int timeout = 30 * 1000; // 30 seconds, to allow for very slow machines

Process p = CreateProcessPortable(RemotelyInvokable.WriteLineReadLine);
p.StartInfo.RedirectStandardInput = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public static void Join_Multiple_LeftWithOrderingColisions_UnorderedRight(Labele

[Theory]
[OuterLoop]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 512, 1024 })]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 256, 512 })]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")]
public static void Join_Multiple_LeftWithOrderingColisions_UnorderedRight_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Expand Down Expand Up @@ -354,7 +354,7 @@ protected override void ValidateRightValue(int left, int right, int seenRightCou

protected override int GetExpectedSeenLeftCount(int leftCount, int rightCount)
{
if (rightCount >= KeyFactor)
if (rightCount >= KeyFactor)
{
return leftCount;
}
Expand Down Expand Up @@ -420,7 +420,7 @@ public static void Join_CustomComparator_LeftWithOrderingColisions_UnorderedRigh

[Theory]
[OuterLoop]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 512, 1024 })]
[MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 256, 512 })]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")]
public static void Join_CustomComparator_LeftWithOrderingColisions_UnorderedRight_Longrunning(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount)
{
Expand Down
Loading

0 comments on commit ef69a7b

Please sign in to comment.