Update alpine image that includes lldb python support and enable tests on 6.0 (#2460)
authorMike McLaughlin <mikem@microsoft.com>
Wed, 28 Jul 2021 21:17:27 +0000 (14:17 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Jul 2021 21:17:27 +0000 (21:17 +0000)
* Update alpine image that includes lldb python support

* Enable lldb and dump tests on Alpine

* Don't run the bpmd portions of the tests on Alpine

* Add requiresCapPtraceContainer:true to Alpine legs

diagnostics.yml
src/SOS/SOS.UnitTests/SOS.cs
src/SOS/SOS.UnitTests/Scripts/NestedExceptionTest.script
src/SOS/SOS.UnitTests/Scripts/OtherCommands.script
src/SOS/SOS.UnitTests/Scripts/StackAndOtherTests.script

index 5ff5383add34cf8d77c42f96fdeee3f8e8be7fa2..0ffba53fdda7aafd7ea377719dd3234218b90f6f 100644 (file)
@@ -142,8 +142,9 @@ stages:
       parameters:
         name: Alpine3_13
         osGroup: Linux
-        dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210720123506-ddfc481
+        dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210728123842-ddfc481
         artifactsTargetPath: bin/Linux-musl.x64.Release
+        requiresCapPtraceContainer: true
         strategy:
           matrix:
             Build_Release:
index e1f6ec5fdd2c3ffe73a2af4bb12880d7fd887d9d..1f3ad1689db9d475fb66d2ec1357083fa3a98e95 100644 (file)
@@ -41,9 +41,8 @@ public class SOS
     {
         information.OutputHelper = Output;
 
-        // TODO: enable when the Alpine images (we are currently using 3.13) have the py3-lldb package installed.
         // TODO: enable either when bpmd is fixed on Alpine or the bpmd tests are ifdef'ed out of the scripts for Alpine
-        if (testLive && !SOSRunner.IsAlpine())
+        if (testLive)
         {
             // Live
             using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.Live))
@@ -52,12 +51,10 @@ public class SOS
             }
         }
 
-        // TODO: enable for 6.0 when PR https://github.com/dotnet/runtime/pull/56272 is merged/released
-        if (testDump && !SOSRunner.IsAlpine())
+        if (testDump)
         {
-            // Create and test dumps on OSX only if the runtime is 6.0 or greater
-            // TODO: reenable for 5.0 when the MacOS createdump fixes make it into a service release (https://github.com/dotnet/diagnostics/issues/1749)
-            if (OS.Kind != OSKind.OSX || information.TestConfiguration.RuntimeFrameworkVersionMajor > 5)
+            // Create and test dumps on OSX or Alpine only if the runtime is 6.0 or greater
+            if (!(OS.Kind == OSKind.OSX || SOSRunner.IsAlpine()) || information.TestConfiguration.RuntimeFrameworkVersionMajor > 5)
             {
                 // Generate a crash dump.
                 if (information.TestConfiguration.DebuggeeDumpOutputRootDir() != null)
index a08bb14a8dbcdb36474f1053df89d7ff7936ecaa..5414b4a00bd9016ce72ecbaf354b277d987cf7e1 100644 (file)
@@ -9,6 +9,8 @@ LOADSOS
 # Verify that bpmd works
 IFDEF:LIVE
 !IFDEF:MAJOR_RUNTIME_VERSION_1
+# Issue: https://github.com/dotnet/diagnostics/issues/2459
+!IFDEF:ALPINE
 
 IFDEF:DESKTOP
 SOSCOMMAND:bpmd NestedExceptionTest.exe NestedExceptionTest.Program.Main
@@ -27,6 +29,7 @@ SOSCOMMAND:ClrStack
 VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+NestedExceptionTest\.Program\.Main(\(.*\))?\s*
 VERIFY:\[.*[\\|/]Debuggees[\\|/](dotnet.+[\\|/])?[Nn]ested[Ee]xception[Tt]est[\\|/][Nn]ested[Ee]xception[Tt]est\.cs @ 8\s*\]\s*
 
+ENDIF:ALPINE
 ENDIF:MAJOR_RUNTIME_VERSION_1
 ENDIF:LIVE
 
index 3bade44250753c7ca4e40132283d284d68f3bde2..91fe0db65cbbc01325afcb066041cb3d636bc6ca 100644 (file)
@@ -7,6 +7,8 @@ LOADSOS
 # Verify that bpmd works
 IFDEF:LIVE
 !IFDEF:MAJOR_RUNTIME_VERSION_1
+# Issue: https://github.com/dotnet/diagnostics/issues/2459
+!IFDEF:ALPINE
 
 IFDEF:DESKTOP
 SOSCOMMAND:bpmd SymbolTestApp.exe SymbolTestApp.Program.Main
@@ -52,6 +54,7 @@ CONTINUE
 SOSCOMMAND:ClrStack
 VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Foo4\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 34\]\s*
 
+ENDIF:ALPINE
 ENDIF:MAJOR_RUNTIME_VERSION_1
 ENDIF:LIVE
 
index 748409dad97b4a1248112ad647b9f62530f1e622..c321762c8f54f08b7bb5ad423579c2cfb0be3023 100644 (file)
@@ -9,6 +9,8 @@ LOADSOS
 # Verify that bpmd works
 IFDEF:LIVE
 !IFDEF:MAJOR_RUNTIME_VERSION_1
+# Issue: https://github.com/dotnet/diagnostics/issues/2459
+!IFDEF:ALPINE
 
 IFDEF:DESKTOP
 SOSCOMMAND:bpmd SymbolTestApp.exe SymbolTestApp.Program.Main
@@ -48,6 +50,7 @@ CONTINUE
 SOSCOMMAND:ClrStack
 VERIFY:\s+<HEXVAL>\s+<HEXVAL>\s+SymbolTestApp\.Program\.Foo4\(.*\)\s+\[(?i:.*[\\|/]SymbolTestApp\.cs) @ 34\]\s*
 
+ENDIF:ALPINE
 ENDIF:MAJOR_RUNTIME_VERSION_1
 ENDIF:LIVE