From 9bd110227b41bf181c20154636ce8510db4ef600 Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Fri, 2 Dec 2022 10:48:23 +0200 Subject: [PATCH 1/3] Update docker images to latest tags --- diagnostics.yml | 36 ++++++++++-------------------- eng/cibuild.sh | 31 +------------------------ src/SOS/SOS.UnitTests/SOSRunner.cs | 3 ++- 3 files changed, 15 insertions(+), 55 deletions(-) diff --git a/diagnostics.yml b/diagnostics.yml index a3c2164984..0dd4054ee7 100644 --- a/diagnostics.yml +++ b/diagnostics.yml @@ -126,7 +126,8 @@ stages: parameters: name: CentOS_7 osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343 + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7 + requiresCapPtraceContainer: true strategy: matrix: Build_Debug: @@ -142,7 +143,7 @@ stages: parameters: name: Alpine3_13 osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210910135845-c401c85 + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode artifactsTargetPath: bin/Linux-musl.x64.Release requiresCapPtraceContainer: true strategy: @@ -193,7 +194,7 @@ stages: parameters: name: Linux_arm osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20210719121212-8a8d3be + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross crossrootfsDir: '/crossrootfs/arm' buildAndSkipTest: true strategy: @@ -207,7 +208,7 @@ stages: parameters: name: Linux_arm64 osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20210719121212-8a8d3be + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64 crossrootfsDir: '/crossrootfs/arm64' buildAndSkipTest: true strategy: @@ -221,7 +222,7 @@ stages: parameters: name: Linux_musl_arm osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm-alpine-20210923140502-78f7860 + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine crossrootfsDir: '/crossrootfs/arm' artifactsTargetPath: bin/Linux-musl.arm.Release buildAndSkipTest: true @@ -236,7 +237,7 @@ stages: parameters: name: Linux_musl_arm64 osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210923140502-78f7860 + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-alpine crossrootfsDir: '/crossrootfs/arm64' artifactsTargetPath: bin/Linux-musl.arm64.Release buildAndSkipTest: true @@ -255,9 +256,9 @@ stages: - template: /eng/build.yml parameters: - name: Debian_Stretch + name: Debian_Bullseye osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-3e800f1-20190521154431 + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64 dependsOn: CentOS_7 testOnly: true strategy: @@ -270,7 +271,7 @@ stages: # parameters: # name: Fedora_34 # osGroup: Linux -# dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20220331150839-4f64125 +# dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix # dependsOn: CentOS_7 # testOnly: true # requiresCapPtraceContainer: true @@ -284,7 +285,7 @@ stages: # parameters: # name: OpenSuse_15_2 # osGroup: Linux -# dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64-20211018152525-9cc02fe +# dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 # dependsOn: CentOS_7 # testOnly: true # strategy: @@ -293,24 +294,11 @@ stages: # _BuildConfig: Debug # _BuildArch: x64 - - template: /eng/build.yml - parameters: - name: Ubuntu_16_04 - osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-09ca40b-20190520220842 - dependsOn: CentOS_7 - testOnly: true - strategy: - matrix: - Build_Debug: - _BuildConfig: Debug - _BuildArch: x64 - - template: /eng/build.yml parameters: name: Ubuntu_18_04 osGroup: Linux - dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-3e800f1-20190508143252 + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04 dependsOn: CentOS_7 testOnly: true strategy: diff --git a/eng/cibuild.sh b/eng/cibuild.sh index ffc534ba0a..cb0000ebc1 100755 --- a/eng/cibuild.sh +++ b/eng/cibuild.sh @@ -9,7 +9,7 @@ while [[ -h $source ]]; do scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where + # if $source was a relative symlink, we need to resolve it relative to the path where # the symlink file was located [[ $source != /* ]] && source="$scriptroot/$source" done @@ -35,35 +35,6 @@ if [ "$__osname" == "Linux" ]; then source scl_source enable python27 devtoolset-2 fi fi - - # We are using old (2019) centos image in the CI with old cmake (2.8). - # Upgrading to 2021 centos image was failing SOS tests which rely on - # lldb REPL and ptrace etc. e.g. from test attachment logs: - # - # 00:00.136: error: process launch failed: 'A' packet returned an error: 8 - # 00:00.136: - # 00:00.136: - #System.Exception: 'process launch -s' FAILED - # - # so we will keep using old image for now and install newer cmake as a workaround instead.. - # FIXME: delete this comment and the next `if` block once centos image is upgraded. - if [ "$ID" = "centos" ]; then - # upgrade cmake - requiredversion=3.6.2 - cmakeversion="$(cmake --version | head -1)" - currentversion="${cmakeversion##* }" - if ! printf '%s\n' "$requiredversion" "$currentversion" | sort --version-sort --check 2>/dev/null; then - echo "Old cmake version found: $currentversion, minimal requirement is $requiredversion. Upgrading to 3.15.5 .." - curl -sSL -o /tmp/cmake-install.sh https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-Linux-$(uname -m).sh - mkdir "$HOME/.cmake" - bash /tmp/cmake-install.sh --skip-license --exclude-subdir --prefix="$HOME/.cmake" - PATH="$HOME/.cmake/bin:$PATH" - export PATH - cmakeversion="$(cmake --version | head -1)" - newversion="${cmakeversion##* }" - echo "New cmake version is: $newversion" - fi - fi fi "$scriptroot/build.sh" -restore -prepareMachine -ci $@ diff --git a/src/SOS/SOS.UnitTests/SOSRunner.cs b/src/SOS/SOS.UnitTests/SOSRunner.cs index 98366fb0d0..800b492b38 100644 --- a/src/SOS/SOS.UnitTests/SOSRunner.cs +++ b/src/SOS/SOS.UnitTests/SOSRunner.cs @@ -564,7 +564,8 @@ public static async Task StartDebugger(TestInformation information, D { throw new ArgumentException("LLDB helper script path not set or does not exist: " + lldbHelperScript); } - arguments.AppendFormat(@"--no-lldbinit -o ""settings set interpreter.prompt-on-quit false"" -o ""command script import {0}"" -o ""version""", lldbHelperScript); + arguments.Append(@"--no-lldbinit -o ""settings set target.disable-aslr false"" -o ""settings set interpreter.prompt-on-quit false"""); + arguments.AppendFormat(@" -o ""command script import {0}"" -o ""version""", lldbHelperScript); string debuggeeTarget = config.HostExe; if (string.IsNullOrWhiteSpace(debuggeeTarget)) From 291461da9277561fc99fc37405a199978cb6eb3d Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Tue, 25 Apr 2023 11:21:22 -0700 Subject: [PATCH 2/3] Make the CentOS7 builds temporarily build only. --- diagnostics.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diagnostics.yml b/diagnostics.yml index 0dd4054ee7..422d8308a3 100644 --- a/diagnostics.yml +++ b/diagnostics.yml @@ -131,10 +131,12 @@ stages: strategy: matrix: Build_Debug: + _BuildOnly: true _BuildConfig: Debug _BuildArch: x64 _PublishArtifacts: bin/Linux.x64.Debug Build_Release: + _BuildOnly: true _BuildConfig: Release _BuildArch: x64 _PublishArtifacts: bin/Linux.x64.Release From 09dc99251abd8a66cb4e0c2fe0611caab64d5934 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Tue, 25 Apr 2023 15:57:03 -0700 Subject: [PATCH 3/3] Add buildAndSkipTest. Remove _BuildOnly; it didn't do what it was named --- diagnostics.yml | 5 +---- eng/build.yml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/diagnostics.yml b/diagnostics.yml index 422d8308a3..df452f23b1 100644 --- a/diagnostics.yml +++ b/diagnostics.yml @@ -112,12 +112,10 @@ stages: _PublishArtifacts: bin/Windows_NT.x86.Release ${{ if ne(variables['System.TeamProject'], 'public') }}: Build_Release_arm: - _BuildOnly: true _BuildConfig: Release _BuildArch: arm _PublishArtifacts: bin/Windows_NT.arm.Release Build_Release_arm64: - _BuildOnly: true _BuildConfig: Release _BuildArch: arm64 _PublishArtifacts: bin/Windows_NT.arm64.Release @@ -128,15 +126,14 @@ stages: osGroup: Linux dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7 requiresCapPtraceContainer: true + buildAndSkipTest: true strategy: matrix: Build_Debug: - _BuildOnly: true _BuildConfig: Debug _BuildArch: x64 _PublishArtifacts: bin/Linux.x64.Debug Build_Release: - _BuildOnly: true _BuildConfig: Release _BuildArch: x64 _PublishArtifacts: bin/Linux.x64.Release diff --git a/eng/build.yml b/eng/build.yml index c566410d80..6115437680 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -243,4 +243,4 @@ jobs: mergeTestResults: true buildConfiguration: ${{ parameters.name }} continueOnError: true - condition: ne(variables['_BuildOnly'], 'true') + condition: always()