Skip to content

Improve Test Coverage #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
30 tasks
SamboyCoding opened this issue Mar 22, 2025 · 0 comments
Open
30 tasks

Improve Test Coverage #430

SamboyCoding opened this issue Mar 22, 2025 · 0 comments
Labels
area:core-api area:libcpp2il enhancement New feature or request good-first-issue Feel free to PR this!

Comments

@SamboyCoding
Copy link
Owner

SamboyCoding commented Mar 22, 2025

This is a meta-issue to track the process of adding some tests to cover key things which have broken in the past or which urgently need test coverage.

LibCpp2IL

  • v29 full game loading tests, any Unity version 2021.3.1 - 2021.3.39 (inclusive)
    • Windows x64
  • v29.1 full game loading tests, any full release of Unity 2022.1 or 2022.2, or 2022.3 prior to 2022.3.33
    • Windows x64. This actually broke recently and wasn't caught due to lack of testing, and was fixed in 3eb40ca
  • v31 full game loading tests, any Unity 2021.3 version newer than 2021.3.39 (so .40 and later)
    • Windows x64
  • v31.1 full game loading tests, 2022.3.34 and later, or modern unity 6 (presumed)
    • Windows x64.
      • Technically we already test this as part of V29CustomAttributeTests, as that loads a 2022.3.35 game to get attribute blobs from. Just need to double check it covers all relevant code paths.
  • Mach-O parsing tests.
    • We do not need to cover all Unity versions here, there is very little version-dependent logic, but we don't test this at all right now.
    • Arm64
    • x86_64
    • Universal mach-o binary (0xCAFEBABE magic number)
  • WebAssembly parsing tests.
    • Again we do not need to cover all Unity versions here but we should ensure we can load some files and be confident we won't break anything when we push a change.
  • NSO files?
    • Ideally we would have tests for NSO files, but that's possibly tricky from a legal perspective.
  • PE file parsing tests where those are currently lacking.
    • Most notably there's no testing for the export parser yet.
  • ELF file parsing tests where those are currently lacking.
    • x86_32 binary, for relocation testing.
    • x86_64 binary, for relocation testing.
    • Pre-24.2 testing for ARM (both v7 and v8) binaries, to test the unique logic for finding code/meta reg on those binaries.
    • Export parsing tests

Cpp2IL.Core

  • Tests for various KeyFunctionAddress scanners, so we can be more confident in their accuracy on a range of binaries.
    • This will likely require all the Lib tests above so we have a good range of binaries to test scanning.
    • We should manually locate and verify the functions, then check what KeyFunctionAddress scanners find against those known good addresses.
  • Tests for ISIL conversion to ensure that a known sequence of instructions results in a fixed set of ISIL.
    • x86_64
    • NewArmV8 (Disarm)
    • Other architectures as they're implemented...
  • Tests for v29 attribute parsing where coverage is lacking
    • Parsing attributes with fields set (we only test parsing those with properties right now)
    • Parsing attributes that set a field or property in the base type of the attribute.
      • This will likely require a custom setup to be defined in a test game.
  • Tests for MethodAnalysisContext explicit interface overrides list.
  • Tests for IsPrimitive and Type on TypeAnalysisContext
    • These were discovered recently to have been broken for quite some time, see e4ffa0b and 6f9cec5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core-api area:libcpp2il enhancement New feature or request good-first-issue Feel free to PR this!
Projects
None yet
Development

No branches or pull requests

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy