From: Mike McLaughlin Date: Sat, 23 Nov 2019 19:25:53 +0000 (-0800) Subject: Test 3.1 runtime, stop testing on 1.1 and 2.2 (#639) X-Git-Tag: submit/tizen/20200402.013218~14^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ab857cc30c44113111d6ad980806767ea8f05e6;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Test 3.1 runtime, stop testing on 1.1 and 2.2 (#639) Update help doc with some missing aliases. --- diff --git a/eng/install-test-runtimes.ps1 b/eng/install-test-runtimes.ps1 index 0b0a617b6..ecde1064a 100644 --- a/eng/install-test-runtimes.ps1 +++ b/eng/install-test-runtimes.ps1 @@ -11,55 +11,89 @@ param( Set-StrictMode -Version Latest $ErrorActionPreference="Stop" -$RuntimeVersion11="1.1.13" +function Get-Latest-Version([string]$channel, [string]$runtime = "", [bool]$coherent = $false) { + + $VersionFileUrl = $null + if ($runtime -eq "dotnet") { + $VersionFileUrl = "$UncachedFeed/Runtime/$channel/latest.version" + } + elseif ($runtime -eq "aspnetcore") { + $VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$channel/latest.version" + } + elseif ($runtime -eq "") { + if ($coherent) { + $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version" + } + else { + $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" + } + } + else { + throw "Invalid value for $runtime" + } + + $VersionFile = Join-Path -Path $TempDir latest.version + + try { + Invoke-WebRequest $VersionFileUrl -OutFile $VersionFile + } + catch { + return "" + } + + if (Test-Path $VersionFile) { + $VersionText = cat $VersionFile + $Data = @($VersionText.Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries)); + return $Data[1].Trim() + } + + return "" +} + +$ConfigFile = Join-Path -Path $DotNetDir Debugger.Tests.Versions.txt + $RuntimeVersion21="2.1.12" -$RuntimeVersion22="2.2.6" +$AspNetCoreVersion21="2.1.12" $RuntimeVersion30="3.0.0" $AspNetCoreVersion30="3.0.0" -$DailyTestText="true" +$RuntimeVersion31="3.1.0" +$AspNetCoreVersion31="3.1.0" +$RuntimeVersionLatest="" +$AspNetCoreVersionLatest="" -# Always install 2.1 for the daily test (scheduled builds) scenario because xunit needs it -. $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion21 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir -. $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion21 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime aspnetcore -InstallDir $DotNetDir - -# Install the other versions of .NET Core runtime we are going to test. 1.1.x, 2.1.x, 2.2.x, 3.0.x -# and latest. Only install the latest master for daily jobs and leave the RuntimeVersion* -# config properties blank. +$DailyTestText="true" if (!$DailyTest) { $DailyTestText="false" - . $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion11 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir - . $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion22 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir - . $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion22 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime aspnetcore -InstallDir $DotNetDir } -. $DotNetDir\dotnet-install.ps1 -Channel $Branch -Version latest -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir -. $DotNetDir\dotnet-install.ps1 -Channel $Branch -Version latest -Architecture $BuildArch -SkipNonVersionedFiles -Runtime aspnetcore -InstallDir $DotNetDir - -# Now download the latest runtime version and create a config file containing it -$VersionFileUrl = "$UncachedFeed/Runtime/$Branch/latest.version" -$VersionFile = Join-Path -Path $TempDir latest.version -$ConfigFile = Join-Path -Path $DotNetDir Debugger.Tests.Versions.txt +# Get the latest runtime versions for master and create a config file containing it +try { + $RuntimeVersionLatest = Get-Latest-Version $Branch dotnet + $AspNetCoreVersionLatest = Get-Latest-Version $Branch aspnetcore + Write-Host "Latest $Branch runtime: $RuntimeVersionLatest aspnetcore: $AspNetCoreVersionLatest" +} +catch { + Write-Host "Could not download latest $Branch runtime version" +} -Invoke-WebRequest $VersionFileUrl -OutFile $VersionFile +# Install the other versions of .NET Core runtime we are going to test. 2.1.x, 3.0.x, 3.1.x and latest. +. $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion21 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir +. $DotNetDir\dotnet-install.ps1 -Version $AspNetCoreVersion21 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime aspnetcore -InstallDir $DotNetDir -if (Test-Path $VersionFile) { - $VersionText = cat $VersionFile - $Data = @($VersionText.Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries)); - $RuntimeVersionLatest = $Data[1].Trim() +. $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion31 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir +. $DotNetDir\dotnet-install.ps1 -Version $AspNetCoreVersion31 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime aspnetcore -InstallDir $DotNetDir - Write-Host "Latest $Branch version: $RuntimeVersionLatest" +. $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersionLatest -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir +. $DotNetDir\dotnet-install.ps1 -Version $AspNetCoreVersionLatest -Architecture $BuildArch -SkipNonVersionedFiles -Runtime aspnetcore -InstallDir $DotNetDir - ' -' + $DailyTestText +' -' + $RuntimeVersion11 + ' -' + $RuntimeVersion21 + ' -' + $RuntimeVersion22 + ' -' + $RuntimeVersion30 + ' -' + $AspNetCoreVersion30 + ' -' + $RuntimeVersionLatest + ' +' + ' + $DailyTestText +' + ' + $RuntimeVersion21 + ' + ' + $AspNetCoreVersion21 + ' + ' + $RuntimeVersion30 + ' + ' + $AspNetCoreVersion30 + ' + ' + $RuntimeVersion31 + ' + ' + $AspNetCoreVersion31 + ' + ' + $RuntimeVersionLatest + ' + ' + $AspNetCoreVersionLatest + ' ' | Set-Content $ConfigFile - -} -else { - Write-Host "Could not download latest runtime version file" -} diff --git a/eng/install-test-runtimes.sh b/eng/install-test-runtimes.sh index 20fb19a17..6073b4703 100755 --- a/eng/install-test-runtimes.sh +++ b/eng/install-test-runtimes.sh @@ -9,11 +9,53 @@ daily_test=0 branch="master" uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" -runtime_version_11="1.1.13" -runtime_version_21="2.1.12" -runtime_version_22="2.2.6" -runtime_version_30="3.0.0" -aspnetcore_version_30="3.0.0" +# args: +# channel - $1 +# runtime - $2 (dotnet, aspnetcore, "") +# coherent - $3 +get_latest_version_info() { + eval $invocation + + local channel="$1" + local runtime="$2" + local coherent="$3" + + local version_file="$temp_dir/latest.version" + local version_file_url=null + local version_latest="" + + if [[ "$runtime" == "dotnet" ]]; then + version_file_url="$uncached_feed/Runtime/$channel/latest.version" + elif [[ "$runtime" == "aspnetcore" ]]; then + version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version" + elif [ -z "$runtime" ]; then + if [ "$coherent" = true ]; then + version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" + else + version_file_url="$uncached_feed/Sdk/$channel/latest.version" + fi + else + echo "Invalid value for $runtime" + return 1 + fi + + # Use curl if available, otherwise use wget + if command -v curl > /dev/null; then + curl "$version_file_url" -sSL --retry 10 --create-dirs -o "$version_file" + else + wget -q -O "$version_file" "$version_file_url" + fi + + if [ -f "$version_file" ]; then + version_latest="$(cat $version_file | tail -n 1 | tr -d "\r")" + else + echo "Could not download latest runtime version file" + return 1 + fi + + echo "$version_latest" + return 0 +} while [ $# -ne 0 ]; do name=$1 @@ -44,50 +86,44 @@ while [ $# -ne 0 ]; do shift done -daily_test_text="true" +runtime_version_21="2.1.14" +aspnetcore_version_21="2.1.14" +runtime_version_30="3.0.0" +aspnetcore_version_30="3.0.0" +runtime_version_31="3.1.0" +aspnetcore_version_31="3.1.0" +runtime_version_latest="" +aspnetcore_version_latest="" -# Always install 2.1 for the daily test (scheduled builds) scenario because xunit needs it -bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_21" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir" +config_file="$dotnet_dir/Debugger.Tests.Versions.txt" -# Install the other versions of .NET Core runtime we are going to test. 1.1.x, 2.1.x, 2.2.x, 3.0.x -# and latest. Only install the latest master for daily jobs and leave the RuntimeVersion* -# config properties blank. +daily_test_text="true" if [ $daily_test == 0 ]; then daily_test_text="false" - bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_11" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir" - bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_22" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir" fi -bash "$dotnet_dir/dotnet-install.sh" --channel $branch --version latest --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir" -bash "$dotnet_dir/dotnet-install.sh" --channel $branch --version latest --architecture "$build_arch" --skip-non-versioned-files --runtime aspnetcore --install-dir "$dotnet_dir" - -# Now download the latest runtime version and create a config file containing it -version_file_url="$uncached_feed/Runtime/$branch/latest.version" -version_file="$temp_dir/latest.version" -config_file="$dotnet_dir/Debugger.Tests.Versions.txt" +runtime_version_latest="$(get_latest_version_info $branch dotnet false)" +aspnetcore_version_latest="$(get_latest_version_info $branch aspnetcore false)" +echo "Latest $branch runtime: $runtime_version_latest aspnetcore: $aspnetcore_version_latest" -# Use curl if available, otherwise use wget -if command -v curl > /dev/null; then - curl "$version_file_url" -sSL --retry 10 --create-dirs -o "$version_file" -else - wget -q -O "$version_file" "$version_file_url" -fi +# Install the other versions of .NET Core runtime we are going to test. 2.1.x, 3.0.x, 3.1.x and latest. +bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_21" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir" +bash "$dotnet_dir/dotnet-install.sh" --version "$aspnetcore_version_21" --architecture "$build_arch" --skip-non-versioned-files --runtime aspnetcore --install-dir "$dotnet_dir" -if [ -f "$version_file" ]; then - runtime_version_latest=$(cat $version_file | tail -n 1 | tr -d "\r") +bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_31" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir" +bash "$dotnet_dir/dotnet-install.sh" --version "$aspnetcore_version_31" --architecture "$build_arch" --skip-non-versioned-files --runtime aspnetcore --install-dir "$dotnet_dir" - echo "Latest $branch version: '$runtime_version_latest'" +bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_latest" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir" +bash "$dotnet_dir/dotnet-install.sh" --version "$aspnetcore_version_latest" --architecture "$build_arch" --skip-non-versioned-files --runtime aspnetcore --install-dir "$dotnet_dir" - echo " -$daily_test_text -$runtime_version_11 -$runtime_version_21 -$runtime_version_22 -$runtime_version_30 -$aspnetcore_version_30 -$runtime_version_latest +echo " + $daily_test_text + $runtime_version_21 + $aspnetcore_version_21 + $runtime_version_30 + $aspnetcore_version_30 + $runtime_version_31 + $aspnetcore_version_31 + $runtime_version_latest + $aspnetcore_version_latest " > $config_file - -else - echo "Could not download latest runtime version file" -fi diff --git a/src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt b/src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt index b94f6435f..843a14276 100644 --- a/src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt +++ b/src/SOS/SOS.UnitTests/ConfigFiles/Unix/Debugger.Tests.Config.txt @@ -39,26 +39,18 @@ $(RuntimeVersionLatest) - @@ -68,45 +60,52 @@ SOS.StackAndOtherTests - diff --git a/src/SOS/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt b/src/SOS/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt index e52b73109..6540ed273 100644 --- a/src/SOS/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt +++ b/src/SOS/SOS.UnitTests/ConfigFiles/Windows/Debugger.Tests.Config.txt @@ -47,24 +47,18 @@ $(RuntimeVersionLatest) - @@ -74,33 +68,26 @@ SOS.StackAndOtherTests - @@ -109,25 +96,33 @@ --> + + - - $(RepoRootDir)\.dotnet\dotnet.exe diff --git a/src/SOS/Strike/sosdocs.txt b/src/SOS/Strike/sosdocs.txt index 42aa38e34..8c5662b2d 100644 --- a/src/SOS/Strike/sosdocs.txt +++ b/src/SOS/Strike/sosdocs.txt @@ -144,6 +144,7 @@ Not all SOS commands support DML output. \\ +COMMAND: soe. COMMAND: stoponexception. !StopOnException [-derived] [-create | -create2] @@ -211,6 +212,7 @@ By default, MinidumpMode is 0, so there is no restriction on commands that will run against a minidump. \\ +COMMAND: do. COMMAND: dumpobj. !DumpObj [-nofields] @@ -254,6 +256,7 @@ The arguments in detail: String \\ +COMMAND: da. COMMAND: dumparray. !DumpArray [-start ] @@ -614,6 +617,7 @@ Please note the -aggregate parameter to !ObjSize has been removed. Please see \\ +COMMAND: fq. COMMAND: finalizequeue. !FinalizeQueue [-detail] | [-allReady] [-short] @@ -2012,6 +2016,7 @@ The percentage column contains a breakout of free or unrooted bytes to total byt \\ +COMMAND: ao. COMMAND: analyzeoom. !AnalyzeOOM @@ -2088,6 +2093,7 @@ the "size" is displayed as 0: \\ +COMMAND: lno. COMMAND: listnearobj. !ListNearObj diff --git a/src/SOS/Strike/sosdocsunix.txt b/src/SOS/Strike/sosdocsunix.txt index b6dff6278..0727edb35 100644 --- a/src/SOS/Strike/sosdocsunix.txt +++ b/src/SOS/Strike/sosdocsunix.txt @@ -77,7 +77,10 @@ is in the directory set with the above command. >> I have a chicken and egg problem. I want to use SOS commands, but the CLR isn't loaded yet. What can I do? -There currently isn't any way to get lldb to stop on libcoreclr.so module load. +There currently isn't any way to get lldb to stop on libcoreclr.so module load, but +you can now set a breakpoint on Main with "bpmd". + + (lldb) bpmd Foo.dll Program.Main >> I got the following error message. Now what? @@ -217,6 +220,7 @@ heap. This command recognizes async state machines defined as "async void", "as any other tasks. \\ +COMMAND: dso. COMMAND: dumpstackobjects. DumpStackObjects [-verify] [top stack [bottom stack]] @@ -564,6 +568,7 @@ Possible thread states: Failed to Start Detached \\ + COMMAND: threads. COMMAND: clrthreads. Threads [-live] [-special]