8000 [main] Source code updates from microsoft/vstest (#1630) · dotnet/dotnet@ebdc08e · GitHub
[go: up one dir, main page]

Skip to content

Commit ebdc08e

Browse files
[main] Source code updates from microsoft/vstest (#1630)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 0f9dec5 commit ebdc08e

File tree

7 files changed

+28
-12
lines changed

7 files changed

+28
-12
lines changed

src/source-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@
127127
"commitSha": "fabe4020161ba6c194289c9c963121c948f1f9ea"
128128
},
129129
{
130-
"barId": 275610,
130+
"barId": 276591,
131131
"path": "vstest",
132132
"remoteUri": "https://github.com/microsoft/vstest",
133-
"commitSha": "f97214fe5fd493b90959165c6db77f878bcb60bd"
133+
"commitSha": "dbcd471883202088496ab81d3ec2d3f3be0981b5"
134134
},
135135
{
136136
"barId": 276382,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- will get filled in the next backflow -->

src/vstest/eng/Version.Details.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="vstest" Sha="9bcfe617e4f615d6931e2eec47767c3f15116d1d" BarId="272322" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="vstest" Sha="d13c858f5792ca573c322dcaf2cf7ea814fa5f31" BarId="275513" />
44
<ProductDependencies>
55
<Dependency Name="Microsoft.Internal.CodeCoverage" Version="17.15.0-preview.25354.5">
66
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
77
<Sha>b3c8a0e7de26919a4efd2a347133522dca5b8ee6</Sha>
88
</Dependency>
9-
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="0.2.631904">
9+
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="0.2.0-preview.25366.103">
1010
<Uri>https://github.com/dotnet/dotnet</Uri>
11-
<Sha>9bcfe617e4f615d6931e2eec47767c3f15116d1d</Sha>
11+
<Sha>d13c858f5792ca573c322dcaf2cf7ea814fa5f31</Sha>
1212
</Dependency>
1313
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
1414
<Dependency Name="System.ComponentModel.Composition" Version="4.5.0">
@@ -27,9 +27,9 @@
2727
</Dependency>
2828
</ProductDependencies>
2929
<ToolsetDependencies>
30-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25358.3">
30+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.25367.5">
3131
<Uri>https://github.com/dotnet/arcade</Uri>
32-
<Sha>4e526204e83e615efe8eb5743be7fbccfa4e492a</Sha>
32+
<Sha>d777c20040bdc2e52b372fa98dcb84141ed692d3</Sha>
3333
</Dependency>
3434
<Dependency Name="Microsoft.DiaSymReader.Pdb2Pdb" Version="1.1.0-beta2-19575-01">
3535
<Uri>https://github.com/dotnet/symreader-converter</Uri>

src/vstest/eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>3.3.4</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
4949
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.4</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
5050
<MicrosoftCodeCoverageIOVersion>17.7.0</MicrosoftCodeCoverageIOVersion>
51-
<MicrosoftDiagnosticsNETCoreClientVersion>0.2.631904</MicrosoftDiagnosticsNETCoreClientVersion>
51+
<MicrosoftDiagnosticsNETCoreClientVersion>0.2.0-preview.25366.103</MicrosoftDiagnosticsNETCoreClientVersion>
5252
<MicrosoftExtensionsDependencyModelPackageVersion>6.0.2</MicrosoftExtensionsDependencyModelPackageVersion>
5353
<MicrosoftExtensionsFileSystemGlobbingVersion>6.0.0</MicrosoftExtensionsFileSystemGlobbingVersion>
5454
<MicrosoftFakesVersion>18.0.0-beta.25364.2</MicrosoftFakesVersion>

src/vstest/eng/common/tools.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
414414

415415
# Locate Visual Studio installation or download x-copy msbuild.
416416
$vsInfo = LocateVisualStudio $vsRequirements
417-
if ($vsInfo -ne $null) {
417+
if ($vsInfo -ne $null -and $env:ForceUseXCopyMSBuild -eq $null) {
418418
# Ensure vsInstallDir has a trailing slash
419419
$vsInstallDir = Join-Path $vsInfo.installationPath "\"
420420
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]

src/vstest/global.json

Lines changed: 3 additions 6D40 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "10.0.100-preview.6.25315.102",
3+
"version": "10.0.100-preview.7.25322.101",
44
"rollForward": "minor",
55
"allowPrerelease": false,
66
"architecture": "x64"
@@ -30,9 +30,9 @@
3030
"version": "17.8.0"
3131
},
3232
"vswhere": "2.2.7",
33-
"dotnet": "10.0.100-preview.6.25315.102"
33+
"dotnet": "10.0.100-preview.7.25322.101"
3434
},
3535
"msbuild-sdks": {
36-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25358.3"
36+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25367.5"
3737
}
3838
}

src/vstest/src/Microsoft.TestPlatform.CoreUtilities/Helpers/DotnetHostHelper.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public class DotnetHostHelper : IDotnetHostHelper
2323
{
2424
public const string MONOEXENAME = "mono";
2525

26+
// Mach-O magic numbers from https://en.wikipedia.org/wiki/Mach-O
27+
private const uint MachOMagic32BigEndian = 0xfeedface; // 32-bit big-endian
28+
private const uint MachOMagic64BigEndian = 0xfeedfacf; // 64-bit big-endian
29+
private const uint MachOMagic32LittleEndian = 0xcefaedfe; // 32-bit little-endian
30+
private const uint MachOMagic64LittleEndian = 0xcffaedfe; // 64-bit little-endian
31+
private const uint MachOMagicFatBigEndian = 0xcafebabe; // Multi-architecture big-endian
32+
2633
private readonly IFileHelper _fileHelper;
2734
private readonly IEnvironment _environment;
2835
private readonly IWindowsRegistryHelper _windowsRegistryHelper;
@@ -414,6 +421,14 @@ public bool TryGetDotnetPathByArchitecture(
414421
ReadExactly(headerReader, cpuInfoBytes, 0, cpuInfoBytes.Length);
415422

416423
var magic = BitConverter.ToUInt32(magicBytes, 0);
424+
425+
// Validate magic bytes to ensure this is a valid Mach-O binary
426+
if (magic is not (MachOMagic32BigEndian or MachOMagic64BigEndian or MachOMagic32LittleEndian or MachOMagic64LittleEndian or MachOMagicFatBigEndian))
427+
{
428+
EqtTrace.Error($"DotnetHostHelper.GetMuxerArchitectureByMachoOnMac: Invalid Mach-O magic bytes: 0x{magic:X8}");
429+
return null;
430+
}
431+
417432
var cpuInfo = BitConverter.ToUInt32(cpuInfoBytes, 0);
418433
PlatformArchitecture? architecture = (MacOsCpuType)cpuInfo switch
419434
{

0 commit comments

Comments
 (0)
109
0