Skip to content

Run the decompiler test suite on Linux#3771

Merged
siegfriedpammer merged 3 commits into
masterfrom
decompiler-tests-on-unix
Jun 11, 2026
Merged

Run the decompiler test suite on Linux#3771
siegfriedpammer merged 3 commits into
masterfrom
decompiler-tests-on-unix

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Makes ICSharpCode.Decompiler.Tests green on Linux: 2032 test cases, 1995 passed, 0 failed, 37 deliberate skips (verified on Fedora, .NET 10/11 SDK).

What's in here

  • Test-suite documentation (ICSharpCode.Decompiler.Tests/CLAUDE.md): test kinds, fixture structure, how to add tests, the #if/preprocessor-symbol comparison rules, and the compiler-matrix model.
  • Resolver fix: UniversalAssemblyResolver now searches the shared-framework directory of the executing runtime as a last resort. Hosts without a .NET Framework installation have no GAC, so e.g. the type-forwards of a netstandard facade (pointing to a versioned System.Runtime) were unresolvable there — which among other things misaligned nullability decoding (Nullable<T> occupies no slot in the nullable metadata and must be recognized). On Windows, everything the GAC answered before is unchanged.
  • Test infrastructure: compilation uses the .NET builds of the Roslyn toolsets (tasks/netcore*, bincore/csc.dll/vbc.dll via the dotnet host); ilasm/ildasm options use the - prefix accepted on all platforms; net40 compiles pass mscorlib explicitly; vbc gets -sdkpath, _MYTYPE=Empty and -vbruntime:Microsoft.VisualBasic.Core.dll; the TestRunner gets a self-contained build for the host platform; PdbGen comparisons normalize document-name separators; Correctness/Async uses Console.IsInputRedirected instead of the Windows-only Console.CapsLock.

What stays Windows-only

Configurations depending on Windows-only tools/runtimes are filtered from the matrix off-Windows (Tester.SupportedOnCurrentPlatform) or gated with [Platform("Win")]: legacy csc/vbc, Roslyn 1.x/2.x (net472-only packages), mcs, Force32Bit, executing net40 binaries, __arglist (vararg calling convention is Windows-only in CoreCLR), the Framework-ilasm case, the Windows-path-semantics FileUtility tests, and the Roundtrip fixture. TargetNet40 compilation with Roslyn 3.11+ still runs on Linux. The Windows matrix is unchanged.

🤖 Generated with Claude Code

@siegfriedpammer
siegfriedpammer force-pushed the decompiler-tests-on-unix branch from e808c3e to ec11115 Compare June 11, 2026 20:59
…AUDE.md

Captures the compiler-matrix model, the test kinds and their pipelines,
how to add tests per kind, the #if/preprocessor-symbol comparison rules,
and the probe-a-construct-across-all-compilers workflow, so this no
longer has to be reverse-engineered from the runners.

Assisted-by: Claude:claude-fable-5:Claude Code
…ast resort

Hosts without a .NET Framework installation (e.g. Linux and macOS) have
no GAC; the only system-wide assembly store there is the shared-framework
directory of the runtime executing the decompiler, and
UniversalAssemblyResolver only consulted it through the version <= 4.0
legacy fallback. This made e.g. the type-forwards of a netstandard facade
(pointing to a versioned System.Runtime) unresolvable, which left
well-known types like Nullable<T> without a definition and among other
things misaligned nullability decoding (Nullable<T> occupies no slot in
the nullable metadata, so it must be recognized).

On Windows nothing the GAC answered changes; the new fallback only adds
resolutions that previously failed outright.

Assisted-by: Claude:claude-fable-5:Claude Code
Compilation uses the .NET builds of the Roslyn toolsets (tasks/netcore*,
bincore csc.dll/vbc.dll launched through the dotnet host). ilasm/ildasm
options use the '-' prefix, which all platforms accept. The dotnet-hosted
compilers have no implicit references or SDK path: net40 compiles pass
mscorlib explicitly, and vbc gets -sdkpath, _MYTYPE=Empty and
-vbruntime:Microsoft.VisualBasic.Core.dll (the facade in the ref packs is
not followed for runtime helpers). The TestRunner gets a self-contained
build for the host platform.

Configurations depending on Windows-only tools or runtimes (legacy
csc/vbc, Roslyn 1.x/2.x, mcs, Force32Bit, executing net40 binaries) are
filtered from the matrix off-Windows via Tester.SupportedOnCurrentPlatform
or gated with [Platform("Win")]. PdbGen comparisons normalize document
name separators, and Correctness/Async uses Console.IsInputRedirected
instead of the Windows-only Console.CapsLock.

Assisted-by: Claude:claude-fable-5:Claude Code
@siegfriedpammer
siegfriedpammer force-pushed the decompiler-tests-on-unix branch from ec11115 to bf4233c Compare June 11, 2026 21:07
@siegfriedpammer
siegfriedpammer merged commit 0f9de78 into master Jun 11, 2026
9 checks passed
@siegfriedpammer
siegfriedpammer deleted the decompiler-tests-on-unix branch June 11, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant