Skip to content

Implement relocation tests in cranelift #3030

@afonso360

Description

@afonso360

Feature

Currently we do not perform any tests on the relocations that the backends emit. While implementing #3026 I struggled with getting the correct output partially because I did not have a good way to check what was being emitted.

Benefit

Testing relocations is obviously desirable to prevent regressions and to ensure we get the correct output.

Implementation

@cfallin has suggested two approaches:

  • We perform an end-to-end test with a relocation and execute that on a target platform.
  • Print the relocations in the VCode output and compare them against a golden output in the compile filetests

Alternatives

We can keep going as is, but it would be nice if we could test this

Metadata

Metadata

Assignees

No one assigned

    Labels

    craneliftIssues related to the Cranelift code generator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions